What this calculator does
Estimate an unknown y value from two known coordinate pairs by assuming a straight line between them. Keep the units consistent within each axis. Either point may be entered first. If the requested x lies outside the interval, the same formula gives extrapolation, which may be less reliable for real-world data.
Formula, assumptions and sources
Linear interpolation assumes a straight line. y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). Values outside the known interval are extrapolation.
Worked example
This example uses the initial values shown in the form. It is illustrative and is not a saved personal result.
Example inputs
- First point: x₁
- 0
- First point: y₁
- 10
- Second point: x₂
- 10
- Second point: y₂
- 30
- Find y at x
- 5
Example result
The highlighted point is your requested estimate. Outside the two known x values, it is extrapolation.
View chart data
| x | y |
|---|---|
| 0 | 10 |
| 5 | 20 |
| 10 | 30 |
y = 10 + (5 − 0) × (30 − 10) ÷ (10 − 0). x lies within the known interval.
Frequently asked questions
Can the two x coordinates be identical?
No. The formula would divide by zero and cannot determine a single y for another x from those two points.
How is extrapolation different?
Interpolation estimates inside the known interval. Extrapolation extends the assumed line beyond the supplied points and can be unreliable if the relationship changes.
Method and example checked 4 November 2026. How we check calculations