StatGardenREF. DESK
Calculators/Maths/Linear interpolation
Maths

Linear interpolation calculator

Estimates a missing y (or x) on the straight line through two known points.

Published 8 August 2026 · Updated 24 September 2026

What this calculator does

Linear interpolation estimates a value between two known points by assuming a straight line joins them. It is the workhorse of reading tables, scaling measurements and filling gaps in data.

The distinction between interpolating and extrapolating matters. Estimating at x = 4 between known points at 0 and 10 is interpolation and reasonably safe; estimating at x = 15 is extrapolation and rests on an assumption the data does not support.

The formula

Formulay = y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁); solved for x when y is known instead

The slope between the two known points is computed, and the estimate follows the straight line from the first point through the target x value.

TermMeaning
InterpolationEstimating between known points.
ExtrapolationEstimating outside them, which is considerably riskier.
SlopeThe rate of change between the two known points.

The inputs explained

FieldWhat to enter
x₁x coordinate of the first known point.
y₁y coordinate of the first known point.
x₂x coordinate of the second known point. Must differ from x₁.
y₂y coordinate of the second known point.
Known x: find y hereThe x value to estimate at.

When to use it

Reading between table entries

Engineering and statistical tables often need a value between listed rows.

Filling a gap in data

A missing reading between two known ones can be estimated this way.

Scaling a measurement

Converting between two calibration points is linear interpolation.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

Where does interpolation become extrapolation?

Four target values across and beyond the known range.

Known points (0, 20) and (10, 50)
Target xEstimated yIn range or extrapolated?
x = 020.000Interpolated: within the two known points
x = 432.000Interpolated: within the two known points
x = 1050.000Interpolated: within the two known points
x = 1565.000Extrapolated: outside the two known points
The slope is 3.000 throughout. At x = 4 the estimate is 32.000 and safely interpolated; at x = 15 it gives 65.000 but is flagged as extrapolated, since it sits beyond both known points.

Questions

Why is extrapolation riskier?

Because it assumes the straight-line relationship continues beyond where you have evidence for it. Real relationships frequently curve, level off or reverse outside the measured range, and interpolation at least sits between two observations.

When does linear interpolation fail?

When the underlying relationship is strongly curved and the known points are far apart. The straight line then cuts across the curve and the estimate can be badly wrong, particularly near the middle of a wide gap.

What are the alternatives?

Polynomial or spline interpolation fit curves through several points rather than a line through two. Splines in particular are widely used because they stay smooth without the wild oscillation high-degree polynomials can produce.

Is this the same as linear regression?

No. Interpolation passes exactly through the known points, assuming they are correct. Regression fits a line near many points without passing through them, which suits noisy data.

For the line through two points, see the line equation calculator. For fitting a line to many points, see the correlation calculator.