How to use the Linear Interpolation Calculator
- Enter two known coordinate pairs.
- Choose whether you want to solve for x or y.
- Enter your target value and calculate the point on the connecting line.
Linear Interpolation formula
Linear interpolation assumes a straight-line relationship between two known observations. A target outside the known interval is extrapolation, which may be less reliable.
y = y₁ + (x − x₁)(y₂ − y₁) ÷ (x₂ − x₁)
What the terms mean
- (x₁, y₁) and (x₂, y₂)
- The two known points used to define the straight line.
- Target x or y
- The known coordinate at which you want to find the other coordinate.
- Interval fraction t
- The position from the first known point toward the second. Values between 0 and 1 are within the interval; values outside that range indicate extrapolation.
Find x from a known y
x = x₁ + (y − y₁)(x₂ − x₁) ÷ (y₂ − y₁)
The known y-values must differ when solving for x. This calculator also requires different known x-values.
Linear Interpolation worked examples
Find y between two points
The known points are (10, 20) and (30, 60). Find y when x = 15.
- Find the interval fraction: t = (15 − 10) ÷ (30 − 10) = 0.25.
- Find the change in y: 60 − 20 = 40.
- Calculate y: 20 + 0.25 × 40 = 30.
Answer: The interpolated point is (15, 30).
Find x from a known y
Using (10, 20) and (30, 60), find x when y = 40.
- Select Find x from y.
- Find the fraction: t = (40 − 20) ÷ (60 − 20) = 0.5.
- Calculate x: 10 + 0.5 × (30 − 10) = 20.
Answer: The interpolated point is (20, 40).
Recognize extrapolation
Using (10, 20) and (30, 60), find y when x = 40.
- The target 40 is outside the known x-interval of 10 to 30.
- Find the fraction: t = (40 − 10) ÷ (30 − 10) = 1.5.
- Calculate y: 20 + 1.5 × (60 − 20) = 80.
Answer: The extrapolated point is (40, 80). The assumed relationship may not hold beyond the known interval.
Linear Interpolation Calculator FAQs
What happens outside the interval?
The calculator still evaluates the line, but labels the result as extrapolation. The linear relationship may not hold beyond the known points.
Can I solve for x instead?
Yes. Select Find x and enter a target y. The inverse calculation requires the two known y-values to be different.
Why must the known x-values differ?
Two points with the same x-value do not define a single-valued linear function y(x). Enter points with different x-coordinates.