Skip to content
ENExplore Calculators

Interpolation Calculator

Estimate a value between known data points using linear interpolation.

About Interpolation Calculator

Linear interpolation estimates f(x) between two known points (x₀,y₀) and (x₁,y₁) by drawing a straight line between them: y = y₀ + (y₁-y₀)·(x-x₀)/(x₁-x₀). This is exact for linear functions and a first-order approximation for nonlinear ones.

Formula

Linear interpolation

y = y₀ + (y₁ - y₀) · (x - x₀) / (x₁ - x₀)

(x₀,y₀)
First known point
(x₁,y₁)
Second known point
x
Target x value

Worked example

With the default values below, Interpolation Calculator returns Interpolated y of 5.00000000. Change any input above and every figure here is recalculated in your browser.

Inputs used

x₀ (known)
1
y₀ = f(x₀)
2
x₁ (known)
3
y₁ = f(x₁)
8
x (target)
2

Results

Interpolated y
5.00000000
Slope
3.00000000

Step by step

  1. 1Values used
  2. 2Linear interpolation
  3. 3Interpolated y= 5.00000000
  4. 4Slope= 3.00000000

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

When is linear interpolation accurate?

When the function is approximately linear between the two points, or when the points are close together. For curved data, use polynomial or spline interpolation.

What about extrapolation?

The same formula works for x outside [x₀,x₁], but accuracy degrades quickly. Extrapolation should be used cautiously.

Interpolation Calculator – Calculate Interpolated y & Slope