01

How inverse interpolation works

Linear interpolation assumes the relationship is straight between consecutive data points. Forward interpolation uses that assumption to estimate y from x; the inverse simply solves the same line equation for x instead.

Formulax = x₁ + (y − y₁) · (x₂ − x₁) / (y₂ − y₁)

The tool first sorts the points by y, then finds the consecutive pair that brackets your target. Sorting by y — not x — is what makes the inverse well defined even when the original data is not monotonic.

02

The extrapolation guard

If your target y lies outside the range of the data, there is no bracketing pair and the honest answer is that interpolation cannot help. Extrapolation would require assuming the trend continues, which is a modelling decision, not arithmetic.

Out of range is an error, not a guess. The tool refuses targets outside the data range rather than silently extending the last segment. If you genuinely need extrapolation, fit a model first.

03

Worked example

Data: (1, 2), (3, 6), (5, 7). Target y = 5. Sorted by y, the points are (1,2), (3,6), (5,7). The target 5 falls between y = 2 and y = 6, so the bracketing pair is (1,2) and (3,6).

Slope = (6 − 2)/(3 − 1) = 2. Then x = 1 + (5 − 2)/2 = 2.5. The result panel shows 2.5, along with the bracketing pair so you can audit the choice.

Note that the third point (5, 7) is not used at all. Interpolation is local: only the two points straddling the target matter.

04

When linear interpolation is good enough

  • Dense tables — the closer the points, the smaller the error from assuming straightness.
  • Calibration curves — instrument responses are nearly linear over short spans, so inverse interpolation recovers the measured quantity accurately.
  • Lookup tables — thermocouple and steam tables are inverted this way thousands of times a second in control systems.
  • Not for sharp curvature — near a knee or a peak, linear interpolation can be off by a lot. Add points or use a spline.
05

Bracketing and error

Inverse interpolation is only trustworthy when the target lies between two tabulated values. Inside that bracket the error is bounded by the curvature of the function; outside it, the error is unbounded and grows quickly.

Linear interpolation error
SituationTypical errorComment
Target near a tabulated pointVery smallThe line and the curve agree closely there
Target mid-bracket, smooth functionSmallSecond-order in the interval width
Target mid-bracket, sharp curvatureModerateHalving the interval quarters the error
Target outside the tableUnboundedExtrapolation — the tool refuses

The quadratic error term is proportional to the square of the interval width, so doubling the resolution of the table cuts the interpolation error by four. That is why printed tables were always denser near regions of high curvature.

The extrapolation guard exists for a reason. A straight line extended beyond the data will eventually cross zero and produce a confident, meaningless answer — which is how a great many engineering estimates have gone wrong.

?

Frequently asked questions

What is inverse interpolation?

Finding the x value that corresponds to a given y, using the same piecewise-linear assumption as ordinary interpolation but solving for the other variable.

Why does the tool sort by y instead of x?

Because the inverse function's input is y. Sorting by y finds the two points whose outputs bracket your target, which is what the formula needs.

Can it extrapolate?

No. Targets outside the data range are rejected, because extrapolation depends on an assumption the data cannot verify.

What if two points share the same y?

Then the inverse is not single-valued at that y, and the local slope is zero. The tool will report a division problem rather than returning a misleading number.

How accurate is linear interpolation?

The error scales with the square of the spacing and the curvature of the underlying function. Halving the spacing quarters the error for smooth curves.