Given −∞<λ<Λ<∞, E⊂Rn finite, and f:E→[λ,Λ], how can we extend f to a Cm(Rn) function F such that λ≤F≤Λ and ∣∣F∣∣Cm(Rn) is within a constant multiple of the least possible, with the constant depending only on m and n? In this paper, we provide the solution to the problem for the case m=2. Specifically, we construct a (parameter-dependent, nonlinear) C2(Rn) extension operator that preserves the range [λ,Λ], and we provide an efficient algorithm to compute such an extension using O(NlogN) operations, where N = #(E) .