Linear interpolation reads between the lines of a table: the value of a tax bracket, a temperature between two readings, or a property from an engineering table. It assumes the quantity changes at a constant rate between the two known points.
How to use the Linear Interpolation Calculator
- x₁
- y₁
- x₂
- y₂
- x₃
Results update as you type, and everything is calculated in your browser.
How it works
The fraction of the way from x₁ to x₂ is applied to the change from y₁ to y₂. Values of x₃ outside the interval give an extrapolation.
Inputs explained
| Field | What to enter |
|---|---|
| x₁ | A number |
| y₁ | A number |
| x₂ | A number |
| y₂ | A number |
| x₃ | A number |
What each result means
- y₃ = [y₁] + ([x₃] – [x₁])×([y₂] – [y₁])÷([x₂] – [x₁])
- Slope m = ([y₂] – [y₁])÷([x₂] – [x₁])
- Intercept b = [y₁] – ([y₂] – [y₁])÷([x₂] – [x₁])×[x₁]
Example values
How the main result changes when x₁ changes and everything else stays at the example values above:
| x₁ | y₃ |
|---|---|
| 5 | 55 |
| 7.5 | 53 |
| 10 | 50 |
| 12.5 | 45 |
| 15 | 35 |
Formula
y₃ = y₁ + (x₃ − x₁) × (y₂ − y₁) ÷ (x₂ − x₁)
Worked example
Inputs: x₁: 10; y₁: 40; x₂: 20; y₂: 65; x₃: 14.
Results: y₃ = 50; Slope m = 2.5; Intercept b = 15; Interpolation or extrapolation? = Interpolation (inside the interval).
Key terms
- Interpolation
- Estimating values between known points.
Frequently asked questions
What is linear interpolation?
Estimating a value between two known points by assuming a straight line between them.
How accurate is it?
Exact for linear data; for curved data the error grows with the spacing of the points.
What is extrapolation?
Using the same line outside the known interval, which is less reliable.
What is the formula in words?
Start at y₁ and add the same fraction of the y-change as x₃ is of the x-change.