Home · Everyday · Algebra · Linear Interpolation Calculator
Linear Interpolation Calculator
Estimate a value between two known points on a straight line — the everyday 'lerp' behind tables and charts.
What this calculator does
Estimate a value between two known points on a straight line — the everyday 'lerp' behind tables and charts. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
Linear interpolation walks from (x₁, y₁) towards (x₂, y₂) in proportion to how far x has moved between x₁ and x₂: y = y₁ + (y₂ − y₁)(x − x₁)/(x₂ − x₁). It is exact when the underlying relationship really is a straight line.
x₁ and x₂ must differ, otherwise the slope is undefined. Using the formula outside [x₁, x₂] is extrapolation — the arithmetic still works, but the straight-line assumption usually gets worse the further out you go, and curved data is systematically mis-estimated between points too.
Worked example
With the example inputs this page opens with (x₁ 0, y₁ 0, x₂ 10, y₂ 100), the result is 30.0000 — interpolated y. Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| x to interpolate at | Interpolated y | Slope (y₂ − y₁)/(x₂ − x₁) |
|---|---|---|
| 0 | 0 | 10 |
| 2 | 20 | 10 |
| 4 | 40 | 10 |
| 6 | 60 | 10 |
| 8 | 80 | 10 |
| 10 | 100 | 10 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
What if x lies outside the two points?
The formula extrapolates the same straight line. That is sometimes useful, but errors grow with distance because real data rarely stays linear.
How does the Linear Interpolation Calculator work?
Estimate a value between two known points on a straight line — the everyday 'lerp' behind tables and charts. Points (x₁, y₁), (x₂, y₂) · x → Interpolated y. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Linear Interpolation Calculator need?
Points (x₁, y₁), (x₂, y₂) · x → Interpolated y. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Linear Interpolation Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.