Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

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.

Linear Interpolation Calculator

x₀ (first known point): enter a number. Prefilled example: 1.

y₀ (value at x₀): enter a number. Prefilled example: 10.

x₁ (second known point): enter a number. Prefilled example: 5.

y₁ (value at x₁): enter a number. Prefilled example: 30.

x (where you want y): enter a number. Prefilled example: 2.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. x₀ (first known point): enter a number.
  2. y₀ (value at x₀): enter a number.
  3. x₁ (second known point): enter a number.
  4. y₁ (value at x₁): enter a number.
  5. x (where you want y): enter a number.
  6. 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

  1. Y=y0+(x−x0)×(y1−y0)x1−x0
Symbols used in the formula
SymbolMeaning
x0x₀ (first known point)
y0y₀ (value at x₀)
x1x₁ (second known point)
y1y₁ (value at x₁)
xx (where you want y)
YInterpolated 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
  1. Y=10+(2−1)×(30−10)5−1=15

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.

Related calculators