Interpolation[{f1,f2,…}]
constructs an interpolation of the function values fi, assumed to correspond to x values 1, 2, … .
Interpolation[{{x1,f1},{x2,f2},…}]
constructs an interpolation of the function values fi corresponding to x values xi.
Interpolation[{{{x1,y1,…},f1},{{x2,y2,…},f2},…}]
constructs an interpolation of multidimensional data.
Interpolation[{{{x1,…},f1,df1,…},…}]
constructs an interpolation that reproduces derivatives as well as function values.
Interpolation[data,x]
find an interpolation of data at the point x.
Interpolation
Interpolation[{f1,f2,…}]
constructs an interpolation of the function values fi, assumed to correspond to x values 1, 2, … .
Interpolation[{{x1,f1},{x2,f2},…}]
constructs an interpolation of the function values fi corresponding to x values xi.
Interpolation[{{{x1,y1,…},f1},{{x2,y2,…},f2},…}]
constructs an interpolation of multidimensional data.
Interpolation[{{{x1,…},f1,df1,…},…}]
constructs an interpolation that reproduces derivatives as well as function values.
Interpolation[data,x]
find an interpolation of data at the point x.
Details and Options
- Interpolation returns an InterpolatingFunction object, which can be used like any other pure function.
- The interpolating function returned by Interpolation[data] is set up so as to agree with data at every point explicitly specified in data.
- The function values fi can be real or complex numbers, or arbitrary symbolic expressions.
- The fi can be lists or arrays of any dimension.
- The function arguments xi, yi, etc. must be real numbers.
- Different elements in the data can have different numbers of derivatives specified.
- For multidimensional data, the n
derivative can be given as a tensor with a structure corresponding to D[f,{{x,y,…},n}]. - Partial derivatives not specified explicitly can be given as Automatic.
- Interpolation works by fitting polynomial curves between successive data points.
- The degree of the polynomial curves is specified by the option InterpolationOrder.
- The default setting is InterpolationOrder->3.
- You can do linear interpolation by using the setting InterpolationOrder->1.
- Interpolation[data] generates an InterpolatingFunction object that returns values with the same precision as those in data.
- Interpolation allows any derivative to be given as Automatic, in which case it will attempt to fill in the necessary information from other derivatives or function values.
- The following options can be given:
-
InterpolationOrder Automatic set the order of the interpolation Method Automatic set a specifc method to use PeriodicInterpolation Automatic specify if an interpolation is periodic - Interpolation supports a Method option. Possible settings include "Spline" for spline interpolation and "Hermite" for Hermite interpolation.
Examples
open all close allBasic Examples (2)
Construct an approximate function that interpolates the data:
f = Interpolation[{1, 2, 3, 5, 8, 5}]Apply the function to find interpolated values:
f[2.5]Plot the interpolation function:
Plot[f[x], {x, 1, 6}]Compare with the original data:
Show[%, ListPlot[{1, 2, 3, 5, 8, 5}]]Find the interpolated value immediately:
Interpolation[{1, 2, 3, 5, 8, 5}, 2.5]Scope (4)
Interpolate between points at arbitrary
values:
Interpolation[{{0, 0}, {0.1, .3}, {0.5, .6}, {1, -.2}, {2, 3}}]Plot[%[x], {x, 0, 2}]Create data with Table:
Table[{x, Sin[4x]}, {x, 0, 3, 0.5}]Interpolation[%]Plot the interpolated function:
Plot[%[x], {x, 0, 3}]Create a list of multidimensional data:
Flatten[Table[{{x, y}, LCM[x, y]}, {x, 4}, {y, 4}], 1]Create an approximate interpolating function:
f = Interpolation[%]Plot the interpolating function:
ContourPlot[f[x, y], {x, 1, 4}, {y, 1, 4}]Form an interpolation from data given as a TimeSeries:
ts = TemporalData[TimeSeries, {{{1, Cos[1] + Sin[1], Cos[2] + Sin[2], Cos[3] + Sin[3], Cos[4] + Sin[4],
Cos[5] + Sin[5], Cos[6] + Sin[6], Cos[7] + Sin[7], Cos[8] + Sin[8], Cos[9] + Sin[9],
Cos[10] + Sin[10]}}, {{{0.016965744360214943, 0.997386 ... 013995043949912, 3.323754146542503,
4.551557869716615, 5.13709169763333, 5.334143602077121, 5.441221219515277}}}, 1,
{"Continuous", 1}, {"Discrete", 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False, 10.1];ListPlot[ts, Filling -> Axis]fun = Interpolation[ts, InterpolationOrder -> 3]Plot the interpolated function:
Plot[fun[x], {x, ts["FirstTime"], ts["LastTime"]}]Generalizations & Extensions (5)
Create data that includes derivatives at each point:
Table[Evaluate[{{x}, Sin[8x], D[Sin[8 x], x]}], {x, 0, 3, 0.5}]Interpolation[%]Plot[%[x], {x, 0, 3}]Create 2D data that includes a gradient vector at each point:
Flatten[Table[Evaluate[{{x, y}, Sin[x y], D[Sin[x y], {{x, y}}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}], 1]Interpolation[%]ContourPlot[%[x, y], {x, 0, 3}, {y, 0, 3}]Compare with data that does not include gradients:
Flatten[Table[Evaluate[{{x, y}, Sin[x y]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}], 1]Interpolation[%]ContourPlot[%[x, y], {x, 0, 3}, {y, 0, 3}]Also include tensors of second derivatives:
Flatten[Table[Evaluate[{{x, y}, Sin[x y], D[Sin[x y], {{x, y}}], D[Sin[x y], {{x, y}, 2}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}], 1]Interpolation[%]ContourPlot[%[x, y], {x, 0, 3}, {y, 0, 3}]Create a vector-valued InterpolatingFunction of one variable from unstructured vector-valued data:
data = {{{0.}, {1., 2.}}, {{1.2}, {3., 4.}}, {{2.1}, {5., 4.}}, {{3.}, {0., 4.}}};fun = Interpolation[data]fun[1.5]Plot will show both components:
Plot[fun[t], {t, 0, 3}]Unstructured data can be used in the one-variable case.
Create a vector-valued InterpolatingFunction of two variables from structured vector-valued data:
data = Flatten[Table[{{x, y}, {x Sin[π y], y Cos[π x], Tan[π x y]}}, {x, 0, 1, .2}, {y, 0, 1, .2}], 1];fun = Interpolation[data]fun[.5, .5]Plot3D will show all three components:
Plot3D[fun[x, y], {x, 0, 1}, {y, 0, 1}]A single component may be plotted using Part:
DensityPlot[Part[fun[x, y], 3], {x, 0, 1}, {y, 0, 1}]Derivatives may also be included for Hermite interpolation:
jacobian = D[{x Sin[π y], y Cos[π x], Tan[π x y]}, {{x, y}}]With[{j = jacobian}, ddata = Flatten[Table[{{x, y}, {x Sin[π y], y Cos[π x], Tan[π x y]}, j}, {x, 0, 1, .2}, {y, 0, 1, .2}], 1]];hfun = Interpolation[ddata]Options (5)
InterpolationOrder (3)
Make a zeroth‐order interpolation:
Plot[Interpolation[{1, 5, 7, 2, 3, 1}, InterpolationOrder -> 0][x], {x, 1, 6}]Plot[Interpolation[{1, 5, 7, 2, 3, 1}, InterpolationOrder -> 1][x], {x, 1, 6}]Make a quadratic interpolation:
Plot[Interpolation[{1, 5, 7, 2, 3, 1}, InterpolationOrder -> 2][x], {x, 1, 6}]Method (1)
Compare splines with piecewise Hermite interpolation for random data:
data = Transpose[{Range[0, 10] / 10, RandomReal[1, 11]}];sp = Interpolation[data, Method -> "Spline"]he = Interpolation[data, Method -> "Hermite"]The curves appear close, but the spline has a continuous derivative:
GraphicsRow[{Plot[{sp[x], he[x]}, {x, 0, 1}, PlotRange -> All],
Plot[{sp'[x], he'[x]}, {x, 0, 1}, PlotRange -> All]}]Applications (3)
f = Interpolation[RandomReal[1, 20]]Plot[f[x], {x, 1, 20}]Find a continuous interpolation of the GCD function:
f = Interpolation[Flatten[Table[{{x, y}, GCD[x, y]}, {x, 20}, {y, 20}], 1]]DensityPlot[f[x, y], {x, 1, 20}, {y, 1, 20}]Interpolate through a set of points with a spline:
pts = {{0., 0.}, {1., 2.}, {-1., 3.}, {0., 1.}, {3., 0.}};Create a spline interpolation:
splineInterpolation = Interpolation[MapIndexed[{First[#2], #1}&, pts], Method -> "Spline"]Visualize the interpolation and the set of points:
Show[ParametricPlot[splineInterpolation[t], {t, 1, 5}],
Graphics[{Red, Point[pts]}]]Properties & Relations (2)
The interpolating function always goes through the data points:
data = {1, 2, 3, 5, 8, 5};f = Interpolation[data]Show[ListPlot[data], Plot[f[x], {x, 1, 6}]]Find the integral of an interpolating function:
f = Interpolation[{1, 2, 3, -8, 2, 3}]Integrate[f[x], x]Plot the interpolating function and its integral:
Plot[{f[x], %}, {x, 1, 6}]FindRoot[f[x], {x, 1, 1, 6}]Possible Issues (3)
Extrapolation is attempted to go beyond the original data:
Interpolation[{1, 2, 4, -2, 1}]Table[%[i], {i, 6}]With the default choice of order, at least 4 points are needed in each dimension:
Interpolation[{1, 2, 4}]With a lower order, fewer points are needed:
Interpolation[{1, 2, 4}, InterpolationOrder -> 2]The interpolation function will always be continuous, but may not be differentiable:
f = Interpolation[RandomReal[1, 10]]Plot[Evaluate[{f[x], D[f[x], x]}], {x, 1, 10}]See Also
ListInterpolation FunctionInterpolation InterpolatingPolynomial Fit FindFit Quantile Nearest InterpolatingFunction Piecewise BSplineFunction BezierFunction ListLinePlot ListPlot3D FindSequenceFunction SequencePredict
Function Repository: PolyharmonicSplineInterpolation AkimaInterpolation GeneralizedAkimaInterpolation CubicMonotonicInterpolation PolygonInterpolation TransfiniteInterpolation SphericalLinearInterpolation LeeInterpolatingNodes AkimaSpline
Tech Notes
History
Introduced in 1991 (2.0) | Updated in 1996 (3.0) ▪ 2007 (6.0) ▪ 2008 (7.0)
Text
Wolfram Research (1991), Interpolation, Wolfram Language function, https://reference.wolfram.com/language/ref/Interpolation.html (updated 2008).
CMS
Wolfram Language. 1991. "Interpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Interpolation.html.
APA
Wolfram Language. (1991). Interpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Interpolation.html
BibTeX
@misc{reference.wolfram_2026_interpolation, author="Wolfram Research", title="{Interpolation}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Interpolation.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_interpolation, organization={Wolfram Research}, title={Interpolation}, year={2008}, url={https://reference.wolfram.com/language/ref/Interpolation.html}, note=[Accessed: 13-June-2026]}