Linear Interpolation Calculator

Free linear interpolation calculator. Enter two known points (x₁, y₁) and (x₂, y₂) and any x to get y instantly, with the formula and full step-by-step working.

Point 1
Point 2
Find y at

The linear interpolation formula

y = y₁ + (x − x₁) × (y₂ − y₁) / (x₂ − x₁)

The formula draws a straight line through the two known points (x₁, y₁) and (x₂, y₂) and reads off the height of that line at your chosen x. The term (y₂ − y₁)/(x₂ − x₁) is the slope of the line, and (x − x₁) is how far along the x-axis you have moved from the first point.

Worked example

A table gives a value of 25 at x = 10 and 45 at x = 20. What is the value at x = 14?

  1. Slope: (45 − 25) / (20 − 10) = 20 / 10 = 2
  2. Distance from the first point: 14 − 10 = 4
  3. y = 25 + 4 × 2 = 33

Another way to think about it: x = 14 is 40% of the way from 10 to 20, so y is 40% of the way from 25 to 45, which is 25 + 0.4 × 20 = 33.

Common uses

Need the opposite, the x that gives a particular y? Use the inverse interpolation calculator.

Frequently asked questions

What is linear interpolation?

Linear interpolation estimates an unknown value that lies between two known points by assuming the points are joined by a straight line. If you know (x₁, y₁) and (x₂, y₂), the value of y at any x between them is y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁).

When should I use linear interpolation?

Use it whenever you have tabulated data, such as steam tables, tax brackets, survey readings or sensor calibration data, and need a value between two rows. It is accurate when the data changes smoothly and the two points are close together.

What is the difference between interpolation and extrapolation?

Interpolation estimates a value inside the range of your known points. Extrapolation extends the line beyond them. Both use the same formula, but extrapolation is less reliable because you are assuming the trend continues. See the extrapolation calculator.

Does the order of the two points matter?

No. Swapping (x₁, y₁) with (x₂, y₂) gives exactly the same result, because both the numerator and the denominator change sign.

How do I interpolate between two values in Excel?

With x₁ in A2, y₁ in B2, x₂ in A3, y₂ in B3 and the target x in D2, use =B2+(D2-A2)*(B3-B2)/(A3-A2). For a whole table, the table interpolation calculator or our Excel template is faster.

How accurate is linear interpolation?

The error depends on how curved the real relationship is between your two points. For smooth data with closely spaced points the error is usually tiny. For strongly curved data, use more points or a polynomial method such as Lagrange interpolation.