How to Interpolate Between Table Values: Linear, Lagrange and Bilinear
Read between the rows of a table: linear interpolation, Lagrange and Newton polynomials, bilinear steam-table lookups and when extrapolation fails.

How to Interpolate Between Table Values: Linear, Lagrange and Bilinear
Tables give values at neat steps, but questions rarely land on a row. You need the value at 170 °C when the table jumps from 150 to 200, or a logarithm at 2.537 when the table lists 2.53 and 2.54. Interpolation is the method for reading between the lines. This guide covers the three techniques students meet most often and shows how to set out the working. The interpolation and extrapolation calculator does each one with the substitution written out.
Linear interpolation, the workhorse
Assume the quantity changes in a straight line between two neighbouring entries (x₀, y₀) and (x₁, y₁). Then
y = y₀ + (x − x₀) × (y₁ − y₀) ÷ (x₁ − x₀).
Read it as: start at the lower value and add the right fraction of the gap. The fraction is (x − x₀) ÷ (x₁ − x₀), how far x is along the interval.
Example. A table gives f(20) = 46 and f(30) = 61. At x = 26 the fraction is 6 ÷ 10 = 0.6, the gap in y is 15, so f(26) ≈ 46 + 0.6 × 15 = 55.
In an exam, write the formula, then the substituted line, then the answer. That layout earns method marks even if you slip on the arithmetic.
When a straight line is not good enough
If the values curve strongly, a straight line between neighbours overshoots or undershoots. Take e^x: from e² = 7.389 and e³ = 20.086, linear interpolation at 2.5 gives 13.74, while the true value is 12.18. Using more points with a curve does better.
Lagrange polynomials
Through n points with different x values there is exactly one polynomial of degree n − 1. Lagrange writes it as
P(x) = Σ yᵢ Lᵢ(x), with Lᵢ(x) = Π (x − xⱼ) ÷ (xᵢ − xⱼ) over all j ≠ i.
Each Lᵢ equals 1 at its own point and 0 at all the others, so the sum passes through every point. For e^x with the four points x = 1, 2, 3, 4, the basis values at 2.5 are −0.0625, 0.5625, 0.5625 and −0.0625, and the cubic gives about 11.87, far closer than the straight line. The calculator lists every Lᵢ value so you can check the sum by hand.
Newton divided differences
Newton's form builds the same polynomial from a triangular table. The first column is the y values, each next column divides the differences of the previous one by the matching x gaps, and the top diagonal supplies the coefficients:
P(x) = f[x₀] + f[x₀, x₁](x − x₀) + f[x₀, x₁, x₂](x − x₀)(x − x₁) + …
It has a practical advantage: adding a new point only adds one new term. Choose Newton in the tool to see the table.
Choosing the degree
More points is not always better. A high-degree polynomial through many points can wiggle wildly near the ends of the table, an effect known as Runge's phenomenon. A good habit is to use a quadratic or cubic through the points nearest to x. The calculator does exactly that: set the degree and it picks the nearest points automatically.
Bilinear interpolation for two-way tables
Steam and refrigerant tables depend on two inputs, such as temperature and pressure. Interpolate in two passes:
- Along the temperature direction on the lower pressure row.
- Along the temperature direction on the upper pressure row.
- Between those two results in the pressure direction.
Paste the whole table into the bilinear tab with temperatures across the top and pressures down the side, type the target pair and the tool finds the surrounding cell and shows all three lines.
Interpolation versus extrapolation
Interpolation stays inside the range of the data; extrapolation goes beyond it. Extrapolating assumes the pattern continues, which is often false: a population trend, a cooling curve or a material property can change behaviour outside the measured range. The calculator still gives a number but labels it clearly, and you should do the same in written work.
A checklist for exam answers
- Identify the two bracketing rows (or the nearest points for a polynomial).
- Write the formula before substituting.
- Keep the same number of significant figures as the table.
- State whether the result is interpolated or extrapolated.
Limits
Interpolation cannot reveal what happens between rows if the quantity jumps, for example at a phase change in a steam table. It also cannot add accuracy that the table does not contain. This guide and the tool do not cover cubic splines or least-squares fitting, which are better for noisy measured data.


