What is linear interpolation?
Linear interpolation estimates a value between two known points by assuming a straight line between them. It is how engineers, students and analysts read between the rows of a table — design code coefficients, steam tables, tax brackets or experimental data.
y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁)
Worked example
A table gives 50 at x = 10 and 80 at x = 20. At x = 14 you are 40% of the way from 10 to 20, so y = 50 + 0.4 × (80 − 50) = 62.
Bilinear (double) interpolation
When a table has two inputs — for example a coefficient that depends on both a ratio and a slenderness — you interpolate twice:
- Interpolate along the columns (y) in the first row, then in the second row.
- Interpolate between those two results along the rows (x).
The order does not matter: interpolating rows first gives the same answer.
Interpolation vs extrapolation
Interpolation stays between known points and is usually reliable. Extrapolation goes beyond them and assumes the trend continues, which can be badly wrong. The calculator warns you when x is outside x₁–x₂.
Related tools: the hypotenuse calculator, the polynomial calculator and the scientific calculator.
Engineering example: reading a design table
Design codes and handbooks give coefficients only for round values. Suppose a table lists a coefficient of 0.30 for a ratio of 2 and 0.50 for a ratio of 4, and your ratio is 3. Linear interpolation gives 0.30 + (3 − 2) ÷ (4 − 2) × (0.50 − 0.30) = 0.40. When the coefficient depends on two parameters — a ratio and a slenderness, for example — use the bilinear tab with the four surrounding values.
How accurate is linear interpolation?
The error depends on how curved the data is between the two points. For a smooth function, halving the spacing between table values divides the maximum error by about four. If consecutive differences in your table change a lot, the relationship is strongly curved and a higher-order method (quadratic or cubic interpolation through three or four points) will be more accurate.
Interpolation in Excel
For a single linear interpolation, the FORECAST.LINEAR function (or FORECAST in older versions) fitted on just the two neighbouring points gives the same result: =FORECAST.LINEAR(x, {y₁,y₂}, {x₁,x₂}). For whole tables, many engineers write the formula directly: =y1+(x-x1)*(y2-y1)/(x2-x1).
Working with right triangles or slopes? Try the hypotenuse calculator. For converting table units first, use the unit converter.