Linear Interpolation Calculator

Linear Interpolation Calculator

Estimate the y-value at a chosen x by drawing a straight line between two known points.

Last updated: June 2026 | By Patchworkr Team

Interpolation Solver
Estimated y
4
y = 2 + (2 - 1) * (6 - 2) / (3 - 1)

What Is Linear Interpolation?

Linear interpolation estimates a value between two known points by assuming the segment between them is a straight line. The formula uses the slope of that line to calculate the missing y-value.

How to Calculate an Interpolated Value

  1. Enter the two known points.
  2. Choose the x-value where you want the estimate.
  3. Apply y = y1 + (x - x1)(y2 - y1) / (x2 - x1).
  4. Read the estimated y-value in the result panel.
y = y1 + (x - x1) * (y2 - y1) / (x2 - x1)

Worked Example

With points (1, 2) and (3, 6), the estimate at x = 2 is y = 4.

y = 2 + (2 - 1) * (6 - 2) / (3 - 1) = 4

Frequently Asked Questions

What if x1 and x2 are equal?

The slope is undefined when the x-values match, so the calculator rejects that input.

Does the calculator accept decimals?

Yes. Any finite real coordinate is accepted, including decimal and scientific notation values.

Is extrapolation allowed?

Yes. The same formula works when x is outside the interval, although it is then an extrapolation.

Can I leave a field blank?

No. Blank fields are treated as invalid instead of being silently converted to zero.

Related Tools