Maths & numbers

Linear interpolation calculator

Estimate a y value on the line through two known points.

Linear interpolation calculator
Esc to restore

Your inputs

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

y = y₁+(x−x₁)(y₂−y₁)/(x₂−x₁). The known x values must differ. Reports whether x lies between them (interpolation) or outside them (extrapolation). It assumes a straight-line relationship.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

First x
0
First y
10
Second x
10
Second y
30
Requested x
4

Example result

Estimated y
18
Calculation
Interpolation