Algebra
Interpolation as a weighted blend
The same result written as a weighted average of the two known values.
Last updated
The Formula
y = y1 x (1 - t) + y2 x t, where t = (x - x1) / (x2 - x1)
The same result written as a weighted average of the two known values.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| t | Fraction of the way | unitless | Zero at the first point, one at the second. |
| y | Interpolated value | same as y1 | The blended result. |
| y1, y2 | Known values | same as input | The two values being blended. |
What Each Symbol Means
tunitless
Fraction of the way
Zero at the first point, one at the second.
ysame as y1
Interpolated value
The blended result.
y1, y2same as input
Known values
The two values being blended.
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 Interpolation as a weighted blend?
The formula for Interpolation as a weighted blend is y = y1 x (1 - t) + y2 x t, where t = (x - x1) / (x2 - x1). The same result written as a weighted average of the two known values.
What does each symbol in Interpolation as a weighted blend stand for?
t is fraction of the way; y is interpolated value; y1, y2 is known values.
What units should I use with Interpolation as a weighted blend?
Substitute t in unitless, y in same as y1, y1, y2 in same as input. 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 Interpolation as a weighted blend?
Subtracting the points in the wrong order. Both the numerator and the denominator must run in the same direction. Using (x - x1) over (x1 - x2) flips the sign and pushes the answer the wrong way.