Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Linear Interpolation Calculator

Estimate a value between two known data points by linear interpolation: enter both (x, y) pairs and a target x to get the y on the straight line joining them.

Linear Interpolation Calculator

Interpolated y
5
The y-value of the straight line through your two points at the target x, in the same units as the y-values you entered.

Background.

Tables only list some values. A steam table, a table of statistical critical values, a rate schedule or a set of readings taken once an hour all leave gaps, and the number you need usually falls in one of them. Linear interpolation fills the gap by assuming the quantity changes at a steady rate between the listed points on either side. If the target sits 40% of the way from the first x to the second, the answer sits 40% of the way from the first y to the second.

That single assumption is both the strength and the limit of the method. For short gaps, and for quantities that change smoothly, a straight line between neighbours is usually very close to the truth, which is why printed tables have long been read this way. Over long gaps, or across a curve that bends sharply, the straight chord cuts the corner and the estimate drifts. A curve that bends upward between the points, such as y = x², is overestimated everywhere in between; one that bends downward is underestimated.

Enter the two known points and the x you want, and the page returns the y on the straight line through them. The points can go in either order and the line can slope up or down. Nothing stops you entering a target outside the two x-values: the page then extends the line beyond the data, which is extrapolation, and confidence in the answer should fall the further out you go. The only thing refused is two equal x-values, because the points then fix no single line and the formula would divide by zero.

What is linear interpolation calculator?

Linear interpolation estimates an unknown value between two known data points by assuming the relationship is a straight line between them. Given points (x₁, y₁) and (x₂, y₂) and a target x, it returns the y-value of that line at the target. When the target lies between x₁ and x₂ the result is a weighted average of y₁ and y₂, with more weight on the nearer point. Outside that range the same arithmetic becomes linear extrapolation.

How to use this calculator.

  1. Choose the two known points that bracket your target as tightly as possible; the table rows just below and just above it give the best estimate.
  2. Enter the lower row as First x and First y and the upper row as Second x and Second y. Swapping the two rows does not change the answer, as long as each x stays with its own y.
  3. Enter the value you want to look up as Target x, in the same units as the two x-values.
  4. Read the interpolated y. If the target lies outside the two x-values, treat the result as an extrapolation and check it against other data before relying on it.

The formula.

y=y1+(x-x1)(y2-y1)/(x2-x1)

y = y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁). The fraction (y₂ − y₁)/(x₂ − x₁) is the slope of the line, the change in y for each unit of x. Multiplying it by (x − x₁), the distance from the first point to the target, gives how far y has moved since the first point, and adding y₁ gives the answer. Put another way, with t = (x − x₁)/(x₂ − x₁), y = (1 − t)·y₁ + t·y₂: t is the fraction of the way from the first point to the second, so t = 0 returns y₁, t = 1 returns y₂ and t = 0.5 returns their midpoint. A t below 0 or above 1 means extrapolation. The error depends on how much the true curve bends between the points and, for smooth curves, shrinks with the square of the spacing: halving the gap between table rows cuts the typical error to about a quarter.

A worked example.

Example

The default points are (0, 0) and (10, 10), with a target of x = 5. The target lies (5 − 0) ÷ (10 − 0) = 0.5 of the way along, and y rises by 10 − 0 = 10 across the span, so y = 0 + 0.5 × 10 = 5. The line through these points is simply y = x, so here the answer is exact. Curves are less obliging. Take two points on y = x², (2, 4) and (4, 16), and interpolate at x = 3: y = 4 + (3 − 2) × (16 − 4) ÷ (4 − 2) = 4 + 6 = 10. The true value is 9, so the straight chord overshoots by 1. Points closer to the target, (2.5, 6.25) and (3.5, 12.25), give 9.25, and the error drops to a quarter.

x5
y10
x10
y210
x210

Frequently asked questions.

How do I read a value between two rows of a table?
Enter the row just below your target as the first point and the row just above as the second. If a table lists 1.20 at 100 and 1.35 at 150 and you need the value at 120, the target is 20/50 = 0.4 of the way along, so the answer is 1.20 + 0.4 × 0.15 = 1.26.
What happens if my target is outside the two known points?
The page extends the straight line past your data, which is extrapolation. With the default points, a target of 15 returns 15. That is reasonable only if you have good reason to believe the trend continues unchanged; real quantities often level off or accelerate beyond the range you measured.
How accurate is linear interpolation?
It is exact when the underlying relationship really is a straight line. Otherwise the error depends on how sharply the curve bends and on the distance between your two points. On y = x², points 2 units apart give an error of 1 at the midpoint, while points 1 unit apart give 0.25.
What should I do when the data grow exponentially?
A straight line through exponential data overestimates in between. If a quantity grows from 1,000 to 4,000 over two years, linear interpolation gives 2,500 at one year, but steady percentage growth would put it at 2,000. Interpolating the logarithms of the values, then converting back, follows that kind of curve far better.
Is linear interpolation the same as linear regression?
No. Interpolation draws a line exactly through two chosen points and assumes they are accurate. Regression fits the best straight line through many scattered points, and that line need not pass through any of them. Use regression when measurements are noisy and plentiful, interpolation when you are reading between trusted values.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
y=y1+(x-x1)(y2-y1)/(x2-x1)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon