How it’s calculated
Bilinear interpolation estimates a value at a point inside a rectangle when you know the value at all four corners. It is two rounds of ordinary linear interpolation: first along x on the bottom and top edges, then along y between those two results. Doing y first gives exactly the same answer.
Example: corners 10, 20 (bottom) and 30, 60 (top) on a 10 by 20 rectangle, point (4, 5). Along the bottom, R₁ = 10 + 0.4 × 10 = 14. Along the top, R₂ = 30 + 0.4 × 30 = 42. Then f = 14 + 0.25 × (42 − 14) = 21.
Typical uses are reading a two-way table (for example a value that depends on temperature and pressure) and resampling images.
Frequently asked questions
Does it matter whether I interpolate x or y first?
No. For bilinear interpolation both orders give the same answer.
Is the result a flat plane?
Not quite. Along any horizontal or vertical line the result is straight, but the surface between four corners can curve, because it contains an x·y term.
What if my point is outside the rectangle?
The same formula still works, but it is then extrapolation and the calculator says so. Treat the answer with caution.
Do the corners have to be in a particular order?
No. Enter each corner value next to its own x and y. Swapping x₁ and x₂ (and their values) gives the same result.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- NIST Digital Library of Mathematical Functions, §3.3 Interpolation (linear interpolation, eq. 3.3.14, applied along x and then y) — NIST
- College Algebra 2e, §4.1 Linear Functions (the straight-line formula used along each edge) — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator