ListInterpolation[array]
constructs an InterpolatingFunction object that represents an approximate function that interpolates the array of values given.
ListInterpolation[array,{{xmin,xmax},{ymin,ymax},…}]
specifies the domain of the grid from which the values in array are assumed to come.
ListInterpolation
ListInterpolation[array]
constructs an InterpolatingFunction object that represents an approximate function that interpolates the array of values given.
ListInterpolation[array,{{xmin,xmax},{ymin,ymax},…}]
specifies the domain of the grid from which the values in array are assumed to come.
Details and Options
- You can replace {xmin,xmax} etc. by explicit lists of positions for grid lines. The grid lines are otherwise assumed to be equally spaced.
- ListInterpolation[array] assumes grid lines at integer positions in each direction.
- array can be an array in any number of dimensions, corresponding to a list with any number of levels of nesting.
- ListInterpolation[array,domain] generates an InterpolatingFunction object that returns values with the same precision as those in {array,domain}.
- ListInterpolation takes the following options:
-
InterpolationOrder Automatic set the order of the interpolation Method Automatic set a specifc method to use PeriodicInterpolation False specify if an interpolation is periodic - ListInterpolation supports a Method option. Possible settings include "Spline" for spline interpolation and "Hermite" for Hermite interpolation.
Examples
open all close allBasic Examples (3)
Construct an approximate function that interpolates the data:
f = ListInterpolation[{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}]]Construct an approximate function with the x values equally spaced on the interval
:
g = ListInterpolation[{1, 2, 3, 5, 8, 5}, {{0, 1}}]Apply the function to find interpolated values:
g[0.5]Plot the interpolation function with the original data:
Plot[g[x], {x, 0, 1}, Epilog -> MapIndexed[Point[{(#2[[1]] - 1) / 5, #1}]&, {1, 2, 3, 5, 8, 5}]]Construct an approximate function that interpolates the values from an array of values:
f = ListInterpolation[Table[Sin[x y], {x, 0, 1, .25}, {y, 0, 2, .25}], {{0, 1}, {0, 2}}]Plot the function with the original data:
Show[{Plot3D[f[x, y], {x, 0, 1}, {y, 0, 2}], Graphics3D[{Red, PointSize[0.03], Table[Point[{x, y, Sin[x y]}], {x, 0, 1, .25}, {y, 0, 2, .25}]}]}]Scope (4)
Interpolate between points at arbitrary x values:
f = ListInterpolation[{0, .3, .6, -.2, 3}, {{0, .1, .5, 1, 2}}]Plot[f[x], {x, 0, 2}]The x values may be included in the data directly:
Plot[ListInterpolation[{{{0}, 0}, {{0.1}, 0.3}, {{0.5}, 0.6}, {{1}, -0.2}, {{2}, 3}}][x], {x, 0, 2}]Create data with Table:
Table[{{x}, Sin[4x]}, {x, 0, 3, 0.5}]f = ListInterpolation[%]Plot the interpolated function:
Plot[f[x], {x, 0, 3}]Create a list of multidimensional data:
Table[LCM[x, y], {x, 4}, {y, 4}]Create an approximate interpolating function:
f = ListInterpolation[%]Plot the interpolating function:
ContourPlot[f[x, y], {x, 1, 4}, {y, 1, 4}]Generalizations & Extensions (3)
Create data including derivative values:
Table[Evaluate[{Sin[8x], D[Sin[8 x], x]}], {x, 0, 3, 0.5}]f = ListInterpolation[%, {{0, 3}}]Plot[f[x], {x, 0, 3}]Create 2D data that includes a gradient vector at each point:
Table[Evaluate[{Sin[x y], D[Sin[x y], {{x, y}}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]Compare with data that does not include gradients:
Table[Sin[x y], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]Also include tensors of second derivatives:
Table[Evaluate[{Sin[x y], D[Sin[x y], {{x, y}}], D[Sin[x y], {{x, y}, 2}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]Options (7)
InterpolationOrder (4)
Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 0][x], {x, 0, 1}]Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 1][x], {x, 0, 1}]Make a quadratic interpolation:
Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 2][x], {x, 0, 1}]Make an interpolation linear in the first dimension and quadratic in the second:
Plot3D[ListInterpolation[IdentityMatrix[4], {{0, 1}, {0, 1}}, InterpolationOrder -> {1, 2}][x, y], {x, 0, 1}, {y, 0, 1}]Method (1)
Compare splines with piecewise Hermite interpolation for random data:
data = RandomReal[1, 10];sp = ListInterpolation[data, {{0, 1}}, Method -> "Spline"]he = ListInterpolation[data, {{0, 1}}, Method -> "Hermite"]The curves appear close, but the spline has a continuous derivative:
Row[{Plot[{sp[x], he[x]}, {x, 0, 1}, PlotRange -> All],
Plot[{sp'[x], he'[x]}, {x, 0, 1}, PlotRange -> All]}]PeriodicInterpolation (2)
Make an interpolating function that repeats periodically:
Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 2 Pi}}, PeriodicInterpolation -> True][x], {x, 1, 20}]Make an interpolating function that repeats periodically in the second dimension only:
Plot3D[ListInterpolation[PadRight[IdentityMatrix[4], {4, 6}, 0, {0, 1}], {{0, 1}, {0, 1}}, PeriodicInterpolation -> {False, True}][x, y], {x, 0, 1}, {y, -1, 2}]Properties & Relations (2)
The interpolating function always goes through the data points:
data = {1, 2, 3, 5, 8, 5};f = ListInterpolation[data]Show[ListPlot[data], Plot[f[x], {x, 1, 6}]]Find the integral of an interpolating function:
f = ListInterpolation[{1, 2, 3, -3, -2, -1, 0, 1}, {{0, 1}}]fi[x_] = Integrate[f[x], x]Plot the interpolating function and its integral:
Plot[{f[x], fi[x]}, {x, 0, 1}]r = FindRoot[fi[x], {x, .5}]Possible Issues (4)
Beyond the domain defined by the original data extrapolation is used:
f = ListInterpolation[Table[Sin[2 Pi x], {x, 0, 1, .1}], {{0, 1}}]f[1.5]A plot shows the inaccuracy of extrapolation:
Plot[{Sin[2 Pi x], f[x]}, {x, -.5, 1.5}]With the default choice of order, at least 4 points are needed in each dimension:
ListInterpolation[{1, 2, 4}]With a lower order, fewer points are needed:
ListInterpolation[{1, 2, 4}, InterpolationOrder -> 2]The interpolation function will always be continuous, but may not be differentiable:
f = ListInterpolation[RandomReal[1, 10], {{0, 1}}]Plot[Evaluate[{f[x], D[f[x], x]}], {x, 0, 1}]If
derivatives are specified, the interpolation function will have a continuous ![]()
derivative:
f = ListInterpolation[RandomReal[1, {6, 3}], {{0, 25}}]Plot[Evaluate[Table[D[f[x], {x, k}], {k, 0, 3}]], {x, 0, 25}]Tech Notes
Related Guides
History
Introduced in 1996 (3.0) | Updated in 2008 (7.0)
Text
Wolfram Research (1996), ListInterpolation, Wolfram Language function, https://reference.wolfram.com/language/ref/ListInterpolation.html (updated 2008).
CMS
Wolfram Language. 1996. "ListInterpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/ListInterpolation.html.
APA
Wolfram Language. (1996). ListInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListInterpolation.html
BibTeX
@misc{reference.wolfram_2026_listinterpolation, author="Wolfram Research", title="{ListInterpolation}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ListInterpolation.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_listinterpolation, organization={Wolfram Research}, title={ListInterpolation}, year={2008}, url={https://reference.wolfram.com/language/ref/ListInterpolation.html}, note=[Accessed: 13-June-2026]}