Bilinear Interpolation Calculator

Perform bilinear interpolation to estimate a value at an arbitrary point (x,y) within a rectangular grid of known values.

Formula

f(x,y) = [q11(x₂-x)(y₂-y) + q21(x-x₁)(y₂-y) + q12(x₂-x)(y-y₁) + q22(x-x₁)(y-y₁)] / [(x₂-x₁)(y₂-y₁)]
  • Bilinear interpolation uses weighted average of 4 surrounding grid points.
  • Query point (x,y) must be within the rectangle [x₁,x₂] × [y₁,y₂].
  • Applications: image scaling, terrain elevation, lookup tables.

Unit square with corner values 10,20,30,40

Inputs
  • x₁ (left): 0
  • x₂ (right): 1
  • y₁ (bottom): 0
  • y₂ (top): 1
  • f(x₁,y₁) — bottom-left: 10
  • f(x₁,y₂) — top-left: 20
  • f(x₂,y₁) — bottom-right: 30
  • f(x₂,y₂) — top-right: 40
  • Query point x: 0.5
  • Query point y: 0.5

Center of unit square = (10+20+30+40)/4 = 25.

Frequently asked questions

What is bilinear interpolation?
A method to estimate values at arbitrary points within a rectangular grid using linear interpolation in both x and y directions.
When is it used?
Image resizing, geographic information systems (GIS), lookup tables in engineering, and texture mapping in graphics.
Is it exact or approximate?
Exact on grid points. Between grid points, it linearly interpolates — may not match curved surfaces exactly.
What is the difference from bicubic interpolation?
Bicubic uses 16 surrounding points for smoother results; bilinear uses only 4 and is simpler/faster.