About the Linear Interpolation Calculator
This linear interpolation calculator estimates an unknown value that lies on the straight line through two known data points (x₁, y₁) and (x₂, y₂). Enter the two points and the x you are interested in, and it returns the matching y, along with the slope, the line equation and how far along the interval your point sits. Switch the mode to solve the reverse problem and find the x that gives a target y.
Engineers and students use it to read between rows of steam tables, property tables and statistical tables; analysts use it to fill gaps in time series; and anyone can use it to estimate a value at a date, temperature or size that is not listed. If your x lies outside the two known points the calculator still answers, but labels the result as extrapolation.
Linear interpolation assumes the quantity changes at a constant rate between the two points. That is usually a good approximation when the points are close together, but for strongly curved data (exponential growth, for example) the estimate can be noticeably off, and extrapolating far beyond the data is riskier still.
With the default inputs, the interpolated value (y, or x in reverse mode) is 2.6714. Change any value above to recalculate instantly.
How to use the linear interpolation calculator
- 1Choose whether you want y at a given x, or the x that gives a target y.
- 2Enter the two known points from your table or data.
- 3Enter the x (or y) you want to look up.
- 4Read the interpolated value and check whether it is interpolation or extrapolation.
Formula and method
Linear interpolation draws a straight line through the two known points and reads off the value at x. The fraction (x − x₁) ÷ (x₂ − x₁) says how far x lies between the two points (0 at the first, 1 at the second); the same fraction of the change in y is added to y₁.
To solve for x instead, the formula is rearranged to x = x₁ + (y − y₁) × (x₂ − x₁) ÷ (y₂ − y₁). When the fraction is below 0 or above 1 the target lies outside the known interval and the calculation becomes extrapolation, which is the same formula applied beyond the data.
- x₁, y₁
- First known point
- x₂, y₂
- Second known point
- x
- Point where the value is wanted
- y
- Interpolated (or extrapolated) value
Worked examples
Steam table: vapour pressure at 22 °C
Water’s saturation pressure is about 2.339 kPa at 20 °C and 3.170 kPa at 25 °C. 22 °C is 2/5 = 40% of the way along, so y = 2.339 + 0.4 × 0.831 = 2.6714 kPa. (The true value is about 2.645 kPa — the curve bends, so linear interpolation slightly overestimates.)
Extrapolating a trend
Sales rose from 150 to 180 over two years, a slope of 15 per year. 2027 lies 5 years after 2022, or 250% of the interval, so the straight-line extrapolation is 150 + 5 × 15 = 225.
Reverse lookup: x for a target y
The slope is (90 − 50) ÷ (30 − 10) = 2. To reach y = 75 you need (75 − 50) ÷ 2 = 12.5 more units of x, so x = 10 + 12.5 = 22.5.
Frequently asked questions
What is linear interpolation?+
It is a method of estimating a value between two known data points by assuming they are joined by a straight line. The estimate moves the same fraction of the way in y as the target moves in x.
What is the difference between interpolation and extrapolation?+
Interpolation estimates a value inside the range of known points; extrapolation estimates beyond it. Both use the same line, but extrapolation is less reliable because the real trend can change outside the data.
How do I interpolate in a steam table or property table?+
Find the two rows that bracket your value, enter their x and y as the two points, then enter your x. For tables indexed by two variables, interpolate twice in one direction and then once in the other (bilinear interpolation).
How accurate is linear interpolation?+
The error depends on the curvature of the real function and the spacing of the points: it grows with the square of the gap. Close points or nearly straight data give very accurate results.
Can I interpolate in Excel?+
Yes. Use =FORECAST.LINEAR(x, {y1,y2}, {x1,x2}) or write the formula directly: =y1 + (x - x1) * (y2 - y1) / (x2 - x1). This calculator uses the same formula.