Linear Interpolation Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter two known points and the x where you need a value.
Result
Interpolated y
Slope (y₁ − y₀) ÷ (x₁ − x₀)
- Position t = (x − x₀) ÷ (x₁ − x₀) (0 to 1 between the points)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- x₀ (first known point): enter a number.
- y₀ (value at x₀): enter a number.
- x₁ (second known point): enter a number.
- y₁ (value at x₁): enter a number.
- x (where you want y): enter a number.
- Read the result: Interpolated y; the panel also shows Slope (y₁ − y₀) ÷ (x₁ − x₀) and Position t = (x − x₀) ÷ (x₁ − x₀) (0 to 1 between the points).
How this calculator works
Linear interpolation assumes the value changes at a constant rate between two known points: y = y₀ + (x − x₀) × (y₁ − y₀) ÷ (x₁ − x₀).
When t is between 0 and 1 the result is an interpolation; outside that range it is an extrapolation, which is less reliable.
The formula
| Symbol | Meaning |
|---|---|
| x₀ (first known point) | |
| y₀ (value at x₀) | |
| x₁ (second known point) | |
| y₁ (value at x₁) | |
| x (where you want y) | |
| Interpolated y |
Worked example
| x₀ (first known point) | 1 |
|---|---|
| y₀ (value at x₀) | 10 |
| x₁ (second known point) | 5 |
| y₁ (value at x₁) | 30 |
| x (where you want y) | 2 |
| Slope (y₁ − y₀) ÷ (x₁ − x₀) | 5 |
|---|---|
| Position t = (x − x₀) ÷ (x₁ − x₀) (0 to 1 between the points) | 0.25 |
Interpolated y 15
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How do I interpolate between (1, 10) and (5, 30) at x = 2?
The slope is 20 ÷ 4 = 5, so y = 10 + (2 − 1) × 5 = 15.
Can I use it for unit conversions?
Yes, for any linear scale. Between (0, 32) and (100, 212), the Celsius-Fahrenheit line, x = 37 gives 98.6.