InfyCalculator
➗

Linear Interpolation Calculator

Interpolate (or extrapolate) a y-value at any x from two known points using the straight-line formula, with the fitted slope shown.

x₀ (first point)
y₀ (first point)
x₁ (second point)
y₁ (second point)
Target x
Loading calculator…

How it works

y = y₀ + (x − x₀) · (y₁ − y₀) / (x₁ − x₀)

Linear interpolation assumes the quantity changes at a constant rate between two known points and reads off the value in between by walking along that straight line. It is the workhorse behind lookup tables, sensor calibration and quick estimates from data. Ask for an x outside the two points and the same formula extrapolates — reliable only if the linear trend really continues.

Worked example

Given (0, 0) and (10, 100), the slope is (100 − 0)/(10 − 0) = 10 per unit. At x = 3 the value is 0 + 3 × 10 = 30. Because 3 lies between 0 and 10, this is interpolation rather than extrapolation.

Sources: Linear interpolation — Wikipedia

Frequently asked questions

What is the difference between interpolation and extrapolation?

Interpolation estimates a value between your two known points, where the straight-line assumption is safest. Extrapolation applies the same line beyond them, which is riskier because the real trend may bend once you leave the measured range.

When is linear interpolation inaccurate?

When the underlying relationship is curved. Between two points on a steep curve the straight-line estimate can be well off; adding more points, or interpolating over a smaller gap, reduces the error.

Can x₀ and x₁ be in any order?

Yes. The formula works whether the first point has the larger or smaller x — the slope simply carries the correct sign.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.