Linear interpolation

Linear interpolation: calculate a transparent estimate from the values and assumptions you provide.

Linear interpolation: calculate a transparent estimate from the values and assumptions you provide.

Both dots and commas are accepted as decimal separators.

Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.

Method and assumptions

Method version 1.0.0 · Updated

Calculate

Formula: y = y₀ + (x−x₀)(y₁−y₀)/(x₁−x₀

Linear interpolation: calculate a transparent estimate from the values and assumptions you provide.

x0
X₀
y0
Y₀
x1
X₁
y1
Y₁
x
X value to estimate

Deterministic floating-point calculation. The displayed result is rounded to a maximum of 12 significant digits.

Calculate with code

These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.

JavaScript
const y = 10 + (15 - 10) * (2 - 1) / (3 - 1); // 12.5