Calculus & Numerical Methods

Linear Interpolation

Interpolate y at x between two points.

Formula

Formula
y = y0 + (x−x0)y1−y0x1−x0

Variables

SymbolDefinitionType & rangeUnitsRole
x₀,y₀ first point real number (ℝ) input
x₁,y₁ second point real number (ℝ) input
x query real number (ℝ) input

Try it yourself

Interactive calculator
Result

Worked examples

Example 1
Givenx₀ = 0, y₀ = 0, x₁ = 10, y₁ = 100, x = 3
Result30
Example 2
Givenx₀ = 1, y₀ = 5, x₁ = 5, y₁ = 25, x = 3
Result15