Linear Interpolation Calculator

Interpolated value, slope, and fraction between two points.

Math and PercentUpdated 2026-10-132 min read
Linear Interpolation Calculator
Interpolated y
...
Slope...
Fraction along...

What it does

Printed tables leave gaps: tide heights between hours, steam values between pressures, taxes between brackets. Linear interpolation bridges each gap with a straight line drawn between the two nearest rows.

The tool above takes two points with a query x. It returns the interpolated y, the slope, and the fraction along the interval.

The default (10,100) to (20,200) at x = 15 gives 150 at slope 10 per x, exactly halfway. The 0 to 10 case at x = 3 gives 30 with the same slope at 0.3 along.

Calculus texts frame this as point slope linearization, and LibreTexts mirrors the construction for approximation between tabulated values. Tide and engineering tables assume readers interpolate exactly this way.

Straight lines serve short gaps well and punish long ones. Check the fraction first: inside 0 to 1 reads interpolation, outside reads extrapolation with growing risk.

How to use

  1. Type the first point.
  2. Type the second point.
  3. Type the query x.
  4. Read y first.
  5. Read slope beside it.
  6. Read the fraction last.

Formula

y = y0 + (x minus x0)(y1 minus y0)/(x1 minus x0). Slope = (y1 minus y0)/(x1 minus x0).
(x0,y0),(x1,y1)
Known endpoints of the interval.
x
Query point on the x axis.
fraction
Position of x between x0 and x1.

LibreTexts mathematics and OpenStax calculus carry linear approximation with the same point slope build. The fraction (x minus x0)/(x1 minus x0) marks position along the run; y follows proportionally. Equal x inputs have no defined slope, so the tool refuses them.

Worked example

Example: halfway between points

Defaults: (10,100) to (20,200) at x = 15.

  1. Points: (10, 100) and (20, 200), ask x = 15.
  2. Fraction: (15 minus 10) / (20 minus 10) = 0.5.
  3. Value: 100 + 0.5 x (200 minus 100) = 150.
  4. Slope: (200 minus 100) / (20 minus 10) = 10 per x.
  5. Check: midpoint of a straight run splits evenly.
  6. Tool shows 150, 10 per x, 0.5 of the way.

Reference table

Checked interpolation cases
Points and xyFraction
(10,100)-(20,200), x=151500.5
(0,0)-(10,100), x=3300.3
(5,20)-(15,60), x=10400.5
(0,10)-(4,30), x=1150.25

Limits

  • Straightness assumed between points.
  • Curves need more rows or methods.
  • Equal x inputs refused.
  • Garbage rows give garbage y.

Common mistakes

  • Extrapolating far past the interval.
  • Swapping x and y columns.
  • Dividing by zero width intervals.
  • Trusting curved tables blindly.
  • Rounding inputs before math.

Try it yourself

Quick checks. Answers sit tucked under each question.

(0,0) to (10,100) at x = 3?

y = 30, slope 10 per x, 0.3 of the way.

(5,20) to (15,60) at x = 10?

y = 40, slope 4 per x, 0.5 of the way.

x0 = x1 = 5?

x0 equals x1: no slope exists, widen the interval.

Questions

The formula?

y = y0 + (x minus x0)(y1 minus y0)/(x1 minus x0). Straight line between two known points.

Extrapolate outside?

Yes, but error grows past the interval. Curves punish long reaches fast.

Same x twice?

Equal x values give no slope. The tool asks for differing x0 and x1.

Used where?

Tide tables, steam tables, tax brackets, and sensor calibration between printed rows.

Curved data?

No. It assumes straightness; curves need spline or fit methods.

Fraction meaning?

Fraction under 0 or over 1 flags outside the interval. Read it before trusting y.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.