Bilinear Interpolation Calculator

Interpolate in a 2D table from the four surrounding values.

Grid
Corner values
Find f at

Formula

R₁ = Q₁₁ + (x − x₁)(Q₂₁ − Q₁₁)/(x₂ − x₁)
R₂ = Q₁₂ + (x − x₁)(Q₂₂ − Q₁₂)/(x₂ − x₁)
f  = R₁ + (y − y₁)(R₂ − R₁)/(y₂ − y₁)

Interpolate along x on the bottom and top edges, then interpolate between those two results along y.

Example

Corners: 100, 140 (at y = 10) and 120, 180 (at y = 20). Find f at x = 1.5, y = 14.

R₁ = 120,  R₂ = 150,  f = 120 + 0.4 × 30 = 132

Using it with a steam table
  1. Find the two pressures and two temperatures that bracket your state.
  2. Read the property (e.g. specific volume) at the four combinations.
  3. Enter pressures as x₁/x₂, temperatures as y₁/y₂, and the four values as Q.
  4. Enter your actual pressure and temperature as x and y.

FAQ

Is double interpolation the same as bilinear?

Yes. Engineering courses call interpolation in a two-input table (e.g. a superheated steam table) double interpolation.

Does it matter whether I go along x or y first?

No. Both orders give the same result.

Where is it used?

Steam and property tables, image resizing, terrain height maps and 2D lookup tables.