Algebra
Inverse interpolation, solving for x
Swap the axes to find the input that produces a target value.
The Formula
x = x1 + (y - y1) x (x2 - x1) / (y2 - y1)
Swap the axes to find the input that produces a target value.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| x | Interpolated input | same as x1 | The input that gives the target value. |
| y | Target value | same as y1 | The value whose input you want. |
| x1, y1 | Lower point | same as inputs | The known point below the target. |
| x2, y2 | Upper point | same as inputs | The known point above the target. |
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.