Skip to content
MasterMath

Linear Interpolation Calculator

Estimate a value between two known points by assuming a straight line — and get warned when you stray outside the range, where the assumption stops being safe.

Interpolated value

—

Interpolated value—
Slope of the line—
Position along the range—
Note—

How this was worked out

    The rule

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

    Why it works

    Linear interpolation draws a straight line between two known points and reads off any value in between. It is the simplest possible assumption about what happens between measurements, and often a perfectly good one.

    How to do it by hand

    1. Work out the slope between the two known points
    2. Measure how far along the range your x sits
    3. Multiply that distance by the slope
    4. Add it to the first point's y value

    What is worth knowing

    The distinction between interpolating and extrapolating matters far more than the arithmetic. Interpolating between two measurements is usually safe, because you have evidence on both sides. Extrapolating past the last one assumes the pattern continues, and that assumption has no evidence behind it — which is why the calculator flags it. Linear interpolation is what every lookup table with intermediate values does, from tax brackets to steam tables, and it is the crudest member of a family that goes up through polynomial and spline interpolation when a straight line will not do.

    Frequently asked questions

    What is the difference between interpolation and extrapolation?

    Interpolating estimates between known points; extrapolating goes beyond them. The second assumes the pattern continues, with no evidence.

    When is linear interpolation good enough?

    When the underlying relationship is roughly straight over the interval, and the two points are close together.

    Why is extrapolation risky?

    Because you have no data on the far side. A relationship that is linear inside a range often is not outside it.

    What are the alternatives?

    Polynomial or spline interpolation when a straight line does not fit, though both can behave badly with noisy data.