Bilinear interpolation reads values between grid points of a two-way table: steam tables, temperature–pressure charts, digital elevation models and image resizing all use it. It is linear interpolation done first in x and then in y.
How to use the Bilinear Interpolation Calculator
- x₁
- x₂
- y₁
- y₂
- Q₁₁ = f(x₁, y₁)
- Q₁₂ = f(x₁, y₂)
- Q₂₁ = f(x₂, y₁)
- Q₂₂ = f(x₂, y₂)
- x
- y
Results update as you type, and everything is calculated in your browser.
How it works
The calculator weights each corner value by the area of the opposite sub-rectangle. Points outside the rectangle are extrapolated, which is less reliable.
Inputs explained
| Field | What to enter |
|---|---|
| x₁ | A number |
| x₂ | A number |
| y₁ | A number |
| y₂ | A number |
| Q₁₁ = f(x₁, y₁) | A number |
| Q₁₂ = f(x₁, y₂) | A number |
| Q₂₁ = f(x₂, y₁) | A number |
| Q₂₂ = f(x₂, y₂) | A number |
| x | A number |
| y | A number |
What each result means
- Interpolated along y₁ (R₁) = [Q₁₁ = f(x₁, y₁)] + ([Q₂₁ = f(x₂, y₁)] – [Q₁₁ = f(x₁, y₁)])×([x] – [x₁])÷([x₂] – [x₁])
- Interpolated along y₂ (R₂) = [Q₁₂ = f(x₁, y₂)] + ([Q₂₂ = f(x₂, y₂)] – [Q₁₂ = f(x₁, y₂)])×([x] – [x₁])÷([x₂] – [x₁])
Example values
How the main result changes when x₁ changes and everything else stays at the example values above:
| x₁ | Interpolated value P |
|---|---|
| 10 | 141.5 |
| 15 | 137 |
| 20 | 128 |
| 25 | 101 |
| 40 | 182 |
Formula
P = [Q₁₁(x₂ − x)(y₂ − y) + Q₂₁(x − x₁)(y₂ − y) + Q₁₂(x₂ − x)(y − y₁) + Q₂₂(x − x₁)(y − y₁)] ÷ [(x₂ − x₁)(y₂ − y₁)]
Worked example
Inputs — x₁: 20; x₂: 30; y₁: 1; y₂: 2; Q₁₁ = f(x₁, y₁): 100; Q₁₂ = f(x₁, y₂): 120; Q₂₁ = f(x₂, y₁): 140; Q₂₂ = f(x₂, y₂): 170; x: 24; y: 1.5.
Results — Interpolated value P = 128; Interpolated along y₁ (R₁) = 116; Interpolated along y₂ (R₂) = 140.
Key terms
- Interpolation
- Estimating values between known data points.
Frequently asked questions
What is bilinear interpolation?
Linear interpolation in two directions inside a rectangle of known values.
Is the result linear?
It is linear along lines parallel to the axes but contains an xy term, so overall it is a hyperbolic paraboloid.
Can I interpolate outside the rectangle?
Mathematically yes (extrapolation), but accuracy drops.
Where is it used?
Lookup tables in engineering, image scaling and GIS.