Linear Interpolation Calculator

Estimate the straight-line value at x using two known coordinate pairs.

Answer

Interpolated value

y = 20

Slope = 2 · fraction across = 0.5

See the point on the line

Why this answer

Move proportionally between the endpoints

Find how far x sits between x₁ and x₂, then apply that same fraction to the change from y₁ to y₂.

Why the same fraction: the piece of the line from (x₁, y₁) to your point and the whole segment to (x₂, y₂) form two right triangles with the same slant, so one is a scaled copy of the other. Every side scales by the same factor, so the fraction across equals the fraction up. Outside x₁…x₂ the fraction goes below 0 or above 1: that's extrapolation, and it only holds if the straight-line trend really continues.

y = 10 + (5 − 0) / (10 − 0) × (30 − 10)

Why it works

Why does the fraction across give the fraction up?

48121620242820 cm?day 2: 12 cmday 6: 20 cm02468day

Step 1 of 5

Guess between two readings

A plant was 12 cm tall on day 2 and 20 cm on day 6. Nobody measured it on day 3. Drag the open dot up or down to your best guess, then check it.
Place your guess, then

Put it to use

Estimate between table values

Linear interpolation is common in engineering tables, calibration data, pricing schedules, time-series estimates, and any setting where a straight-line approximation between measured points is reasonable.

How it works

Linear interpolation estimates an unknown value between two known points by assuming a straight line connects them. You enter two known pairs, (x₁, y₁) and (x₂, y₂), and the x where you want an estimate. The calculator returns y.

It first finds how far x sits between x₁ and x₂ as a fraction. Then it applies that same fraction to the change from y₁ to y₂. If x is 37.5% of the way from x₁ to x₂, the answer is 37.5% of the way from y₁ to y₂.

The page also shows the slope of the line and the fraction across. If x is outside the two points, the same formula extends the line, which is extrapolation. The fraction will be below 0 or above 1, and the result is less reliable.

t = (x − x₁) ÷ (x₂ − x₁)y = y₁ + t × (y₂ − y₁)Equivalent: y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁)Slope m = (y₂ − y₁) ÷ (x₂ − x₁)

Worked example: Estimate y at x = 3.5 from (2, 150) and (6, 230)

  1. Fraction across: t = (3.5 − 2) ÷ (6 − 2) = 1.5 ÷ 4 = 0.375.
  2. Change in y: 230 − 150 = 80.
  3. Move that fraction of the change: 0.375 × 80 = 30.
  4. Add to the start: y = 150 + 30 = 180.
  5. Check with the slope: m = 80 ÷ 4 = 20, and 150 + 20 × 1.5 = 180 ✓

Common mistakes

  • Measuring the fraction from the wrong end. Use x − x₁ on top and pair it with y₁ as the starting value.
  • Swapping the y-values. y₁ must belong to x₁, and y₂ must belong to x₂.
  • Trusting extrapolated values too much. Outside the known points, the straight-line assumption has nothing to back it up.
  • Using it on data that curves sharply. Linear interpolation works best when the points are close together or the data is nearly straight.

Frequently asked questions

What is the linear interpolation formula?

y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). It finds the point on the straight line through (x₁, y₁) and (x₂, y₂) at your x.

What is the difference between interpolation and extrapolation?

Interpolation estimates a value between the known points. Extrapolation extends the line beyond them. With (2, 150) and (6, 230), x = 8 extrapolates to 270.

Why can't x₁ and x₂ be the same?

The formula divides by x₂ − x₁. If they are equal, that is division by zero, and the two points do not define a single line through them.

How do I interpolate in Excel or a table?

Pick the two table rows that bracket your x, then apply y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). In Excel, FORECAST.LINEAR on just those two points gives the same result.