No ads, no sign-upChecked 2026-08-24

Linear Interpolation Calculator

Result

50.0000

Result: 50.0000

Two 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.

The numbers at a glance

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 xResult
0.00000.0000
2.000020.0000
4.000040.0000
5.0000Your value50.0000
6.000060.0000
8.000080.0000
10.0000100.0000

Worked examples

Case 1
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 values
Case 2
First point x (x₁)
10
First point y (y₁)
100
Second point x (x₂)
20
Second point y (y₂)
50
Query x
12

90.0000

Open with these values
Case 3
First point x (x₁)
-2
First point y (y₁)
4
Second point x (x₂)
2
Second point y (y₂)
-4
Query x
1

-2.0000

Open with these values

How it's calculated

y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁)

  1. StepEnter the two known points as a pair each: x₁ with y₁, x₂ with y₂.
  2. StepEnter the x you want a value for; it may lie inside or outside the pair.
  3. ResultRead y off the straight line through the two points at that x.

Reference table

x₁, y₁, x₂, y₂, xWhere the query sitsy
0, 0, 10, 100, 5halfway between50
1, 2, 3, 6, 2halfway between4
10, 100, 20, 50, 12inside, on a falling line90
-5, -10, 5, 10, 0at the origin0
-2, 4, 2, -4, 1inside, negative ground-2
0, 0, 10, 100, 15past x₂ — extrapolated150

Questions

How do I calculate linear interpolation?

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.

What is linear interpolation?

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.

What is the difference between interpolation and extrapolation?

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.

Can the coordinates be zero or negative?

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.

How accurate is linear interpolation?

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.

Sources and last check

  1. en.wikipedia.org

Information, not professional advice.