Math & Science

Interpolation Calculator 2026

Free · No signup
Lagrange polynomial method
Up to 6 data points
Enter Known Data PointsFree · No signup
x
y

Lagrange Interpolation Calculator: How the Method Works

Lagrange interpolation constructs a polynomial that passes exactly through all given data points. For each point (xi, yi), it creates a basis polynomial Li(x) that equals 1 when x = xi and 0 at all other xj. The final polynomial is the sum of yi × Li(x).

P(x) = sum of y_i x L_i(x) for i = 0 to n-1
L_i(x) = product of (x - x_j)/(x_i - x_j) for all j not equal i
Each L_i(x) = 1 when x = x_i and = 0 when x = any other x_j

Linear Interpolation Calculator: Two-Point Formula

Linear interpolation is the simplest and most widely used form. When you have exactly two known points, or when you want to estimate a value between two adjacent entries in a table, linear interpolation assumes the function changes at a constant rate between those two points.

y = y1 + (x - x1) x (y2 - y1) / (x2 - x1)

Example: x1=1, y1=2, x2=3, y2=8, find y at x=2:
y = 2 + (2-1) x (8-2) / (3-1) = 2 + 3 = 5

When to use linear interpolation: when values in a lookup table change smoothly over small intervals (tax tables, steam property tables, trigonometric tables), when you only have two nearby data points, or when speed matters and the function is approximately linear between points.

When you only have two data points, this calculator automatically produces a linear (degree 1) polynomial, which is identical to the linear interpolation formula. For a dedicated two-point calculator, see the Linear Interpolation Calculator.

Double Interpolation Calculator: Two-Variable Lookup

Double interpolation (bivariate interpolation) estimates a value from a 2D table where both the row variable and column variable fall between tabulated entries. It is most common in thermodynamics (steam tables), aviation (performance charts), and engineering (property tables).

StepOperationExample (Steam Tables)
1Find the two rows that bracket your first variableFind T = 220°C between T = 200°C and T = 250°C rows
2Interpolate along the first variable for both columnsInterpolate each property at T = 220°C
3Find the two column values that bracket your second variableFind P = 1.5 MPa between P = 1.0 and P = 2.0 MPa columns
4Interpolate the results from step 2 along the second variableInterpolate the T = 220°C values between the two pressures

For double interpolation, apply this calculator twice. First, use it with the known column values to interpolate along the row variable. Then use the results as input to interpolate along the column variable. The error in double interpolation is larger than single interpolation because two approximation operations are chained. The Correlation Coefficient Calculator quantifies how strongly two variables are linearly related, which helps determine when linear interpolation between them is reliable.

Interpolation Calculator vs Excel: When to Use Each

Excel has limited built-in interpolation support. Understanding what each tool can and cannot do helps you choose the right approach.

TaskExcel FunctionThis Calculator
Linear interpolation (2 points)=FORECAST.LINEAR(x, y_range, x_range)Enter 2 points, get y
Lookup nearest table value=VLOOKUP(x, table, col, TRUE)Not needed - use calc
Quadratic interpolation (3 points)No built-in; manual formulaEnter 3 points directly
Cubic interpolation (4 points)No built-in; complex array formulaEnter 4 points directly
Up to 6-point polynomialNo built-inEnter up to 6 points
Batch multiple x valuesDrag formula down columnOne at a time

For polynomial interpolation with 3 or more points, this calculator is significantly faster than writing the Lagrange formula manually in Excel. For statistical analysis of what function best describes your data, the Mean Median Mode Calculator provides descriptive statistics for understanding your data distribution before choosing an interpolation strategy.

Example Calculation

Given data points (1, 2), (3, 8), and (5, 14), estimate y at x = 2.

Points: (1,2), (3,8), (5,14) | Target x = 2
L0(2) = (2-3)(2-5) / (1-3)(1-5) = (-1)(-3) / (-2)(-4)= 3/8
L1(2) = (2-1)(2-5) / (3-1)(3-5) = (1)(-3) / (2)(-2)= 3/4
L2(2) = (2-1)(2-3) / (5-1)(5-3) = (1)(-1) / (4)(2)= -1/8
P(2) = 2(3/8) + 8(3/4) + 14(-1/8)= 5
y at x=2 is approximately 5

Frequently Asked Questions

Lagrange polynomial interpolation finds a polynomial of degree n-1 that passes exactly through n known data points. For each data point, it constructs a basis polynomial that equals 1 at that point and 0 at all others. The final interpolating polynomial is the weighted sum of these basis polynomials. It is exact at the given points and estimates the function value at any other x.

More Math & Science Calculators

Method by Number of Points
PointsPolynomial
2 pointsLinear (degree 1)
3 pointsQuadratic (degree 2)
4 pointsCubic (degree 3)
5 pointsQuartic (degree 4)
6 pointsQuintic (degree 5)
Key Concept
The Lagrange polynomial is exact at all given data points. The accuracy between points depends on how smooth the original function is and how closely the data points are spaced. For well-behaved functions, more points generally give better estimates.
Browse Categories
Payroll & Tax
50+
Construction & Materials
21+
Health & Fitness
24+
Finance & Investment
20+
Education & GPA
16+
Math & Science
10+
Food & Cooking
8+
Specialty & Other
15+