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
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.
| Term | Meaning |
|---|---|
| Interpolation | Estimating between known points. |
| Extrapolation | Estimating outside them, which is considerably riskier. |
| Slope | The rate of change between the two known points. |
The inputs explained
| Field | What 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 here | The 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.
| Target x | Estimated y | In range or extrapolated? |
|---|---|---|
| x = 0 | 20.000 | Interpolated: within the two known points |
| x = 4 | 32.000 | Interpolated: within the two known points |
| x = 10 | 50.000 | Interpolated: within the two known points |
| x = 15 | 65.000 | Extrapolated: outside the two 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.