Linear Interpolation

Interpolate a value between two known data points.

Formula

y = y₁ + (x−x₁)(y₂−y₁)/(x₂−x₁)
  • y = y₁ + (x−x₁)(y₂−y₁)/(x₂−x₁)

Linear Interpolation Example

Inputs
  • x₁: 0
  • y₁: 0
  • x₂: 10
  • y₂: 100
  • x (interpolate at): 4

Points (0,0) and (10,100): at x=4, y = 0 + (4−0)×(100−0)/(10−0) = 40

Frequently asked questions

How is Linear Interpolation calculated?
y = y₁ + (x−x₁)(y₂−y₁)/(x₂−x₁)