Calculators/Mathematics/Linear Interpolation

Linear Interpolation

Intermediate value between points · reading from tables

Linear Interpolation — illustration
Point 1
x₁y₁
Point 2
x₂y₂
y for x = 4
18
Slope a = 2

Linear interpolation assumes the value changes along a straight line between the points: y = y₁ + (y₂−y₁)·(x−x₁)/(x₂−x₁). Useful e.g. for reading values from tables.

Linear interpolation lets you estimate the value of a function between two known points, assuming it changes along a straight line. For points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2):

y=y1+(y2−y1)⋅x−x1x2−x1y=y_1+(y_2-y_1)\cdot\frac{x-x_1}{x_2-x_1}

It is an everyday tool for physicists and chemists — for reading values from tables (e.g. density, vapour pressure) at an intermediate value that is not listed. If the target xx lies outside the interval [x1,x2][x_1,x_2], we speak of extrapolation (which is less reliable).

Examples

Points (0,10) and (10,30), x = 4
→ y = 10 + 20·0.4 = 18
Points (1,2) and (3,8), x = 2
→ y = 5 (midpoint)

Frequently asked questions

How does interpolation differ from extrapolation?+

Interpolation estimates a value BETWEEN known points; extrapolation estimates one OUTSIDE them. Extrapolation is less trustworthy because it assumes the trend continues beyond the measured range.

When is linear interpolation accurate?+

When the function really does change linearly, or when the points lie close together. For strongly curved relationships it gives an approximation that improves the denser the data.

Found this calculator useful? Share it.

It's free — send it to a friend who's revising.

Teaching? Embed this calculator on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →