- First point x (x₁)
- 0
- First point y (y₁)
- 0
- Second point x (x₂)
- 10
- Second point y (y₂)
- 100
- Query x
- 5
50.0000
Open with these values50.0000
Result: 50.0000Two known points fix a straight line, and linear interpolation reads y off that line at the x you ask for. Between (0, 0) and (10, 100) the value at x = 5 is 50 — halfway across, halfway up. Ask outside the pair and the same line is extended, which is extrapolation and far less safe.
Held fixed: First point x (x₁) 0.0000, First point y (y₁) 0.0000, Second point x (x₂) 10.0000, Second point y (y₂) 100.0000.
| Query x | Result |
|---|---|
| 0.0000 | 0.0000 |
| 2.0000 | 20.0000 |
| 4.0000 | 40.0000 |
| 5.0000Your value | 50.0000 |
| 6.0000 | 60.0000 |
| 8.0000 | 80.0000 |
| 10.0000 | 100.0000 |
50.0000
Open with these values90.0000
Open with these values-2.0000
Open with these valuesy = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁)
| x₁, y₁, x₂, y₂, x | Where the query sits | y |
|---|---|---|
| 0, 0, 10, 100, 5 | halfway between | 50 |
| 1, 2, 3, 6, 2 | halfway between | 4 |
| 10, 100, 20, 50, 12 | inside, on a falling line | 90 |
| -5, -10, 5, 10, 0 | at the origin | 0 |
| -2, 4, 2, -4, 1 | inside, negative ground | -2 |
| 0, 0, 10, 100, 15 | past x₂ — extrapolated | 150 |
Use y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). Put in your two known points and the query x. Between (0, 0) and (10, 100) the value at x = 5 is 0 + 5 × 100 ÷ 10 = 50.
It estimates an unknown value between two points you already know by assuming a straight line joins them. It reads the y value off that line at your chosen x, which makes it the standard way to fill gaps in lookup tables and measurement series.
Interpolation estimates a value inside the range of your known points, with x between x₁ and x₂. Extrapolation estimates one outside that range. This calculator does both, but extrapolation is far less reliable, because the straight-line assumption may no longer hold beyond your data.
Yes. Any of x₁, y₁, x₂, y₂ and x can be zero or negative; the formula is unchanged. The only restriction is that x₂ must differ from x₁, otherwise the segment is vertical and the slope is undefined.
It is exact when the true relationship between the two points really is a straight line. Where the relationship curves, the estimate is an approximation whose error grows with the curvature and shrinks as the two known points move closer together.
Information, not professional advice.
Diese Seite gibt es auch auf Deutsch.
Zu Deutsch wechseln