CCalclabhub

Algebra

Inverse interpolation, solving for x

Swap the axes to find the input that produces a target value.

Last updated

The Formula

x = x1 + (y - y1) x (x2 - x1) / (y2 - y1)

Swap the axes to find the input that produces a target value.

SymbolMeaning
xInterpolated input
yTarget value
x1, y1Lower point
x2, y2Upper point

What Each Symbol Means

xsame as x1

Interpolated input

The input that gives the target value.

ysame as y1

Target value

The value whose input you want.

x1, y1same as inputs

Lower point

The known point below the target.

x2, y2same as inputs

Upper point

The known point above the target.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to calculate linear interpolation page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Calculate Linear Interpolation, filed under Math. Every number the guide produces comes from substituting into this one line.

Common Questions

What is the formula for Inverse interpolation, solving for x?

The formula for Inverse interpolation, solving for x is x = x1 + (y - y1) x (x2 - x1) / (y2 - y1). Swap the axes to find the input that produces a target value.

What does each symbol in Inverse interpolation, solving for x stand for?

x is interpolated input; y is target value; x1, y1 is lower point; x2, y2 is upper point.

What units should I use with Inverse interpolation, solving for x?

Substitute x in same as x1, y in same as y1, x1, y1 in same as inputs, x2, y2 in same as inputs. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.

What is a common mistake when using Inverse interpolation, solving for x?

Forgetting to subtract the first x. The distance is x minus x1, not x itself. Using 25 directly against a span of 100 happens to work here only because x1 is zero.