Bilinear Interpolation Calculator
Estimate a value between four grid points by bilinear interpolation: enter a rectangle's corner coordinates, the values there and a target point inside it.
Bilinear Interpolation Calculator
Background.
Most two-dimensional tables only give values at grid points. A steam table lists properties at round pressures and temperatures, an elevation model stores one height per grid node, a digital image stores one colour per pixel. When you need a value in between, the natural first guess is to blend the four surrounding points, giving more weight to whichever corners the target sits closest to. That blend is bilinear interpolation.
It works as two passes of ordinary straight-line interpolation. Interpolate along the bottom edge of the rectangle to the target's x position, do the same along the top edge, then interpolate between those two results in the y direction. Doing y first and x second gives exactly the same number. Written as a single step, each corner's value is multiplied by the area of the part of the rectangle diagonally opposite it, divided by the whole area, so the four weights always add up to 1.
The name is a little misleading. The result is linear along any line parallel to an axis, but not across the rectangle as a whole: the formula contains an x·y term, so along a diagonal the values follow a curve, and unless the four corners lie on one flat plane the surface is a gently twisted saddle, a hyperbolic paraboloid. That twist is what allows it to match all four corners exactly, which a single plane usually cannot do.
The page interpolates only. The target has to lie inside the rectangle or on its edge, and the left x must be smaller than the right x, the lower y smaller than the upper y. Points outside the cell, or scattered data that does not sit on a rectangle, need a different method.
What is bilinear interpolation calculator?
Bilinear interpolation estimates the value of a quantity at a point (x, y) inside an axis-aligned rectangle from its known values at the four corners: Q11 at (x1, y1), Q21 at (x2, y1), Q12 at (x1, y2) and Q22 at (x2, y2). The estimate is a weighted average of those four values, with the weights set by how far across the rectangle the point lies in each direction. It reproduces every corner exactly and changes linearly along every edge.
How to use this calculator.
- Enter the grid lines that bracket your point in Left x and Right x, then Lower y and Upper y. In a lookup table these are the nearest column and row values on either side of the one you want.
- Enter the four table values in the matching boxes. Value at (x1,y1) is the bottom-left corner, (x2,y1) bottom-right, (x1,y2) top-left and (x2,y2) top-right; putting two of these in the wrong boxes is the easiest mistake to make.
- Enter Target x and Target y. They must fall within the rectangle, edges included; the page refuses points outside it rather than extrapolating.
- If the table is coarsely spaced or the quantity changes sharply between grid lines, treat the answer as an approximation and use a finer table if one exists.
The formula.
The target is first located as fractions of the rectangle: tx = (x − x1) ÷ (x2 − x1) and ty = (y − y1) ÷ (y2 − y1), each between 0 and 1. The value is then f = Q11(1 − tx)(1 − ty) + Q21·tx(1 − ty) + Q12(1 − tx)·ty + Q22·tx·ty. Each product of fractions equals the share of the rectangle's area lying opposite that corner, so a point near the bottom-left corner gives Q11 a weight close to 1, and the four weights always sum to exactly 1. The formula is exact for any quantity of the form a + bx + cy + dxy and approximate for anything that curves more than that. Accuracy therefore depends mainly on how small the grid cell is compared with how quickly the underlying quantity changes.
A worked example.
The rectangle here is the square from 0 to 10 on both axes, with values 0 at (0, 0), 10 at (10, 0), 10 at (0, 10) and 20 at (10, 10), and the target is the centre, (5, 5). The fractions are tx = (5 − 0) ÷ (10 − 0) = 0.5 and ty = 0.5. Every weight is then 0.5 × 0.5 = 0.25, so the result is 0.25 × 0 + 0.25 × 10 + 0.25 × 10 + 0.25 × 20 = 0 + 2.5 + 2.5 + 5 = 10. These corners happen to lie on the flat plane f = x + y, which bilinear interpolation reproduces exactly anywhere in the square: at (8, 3) the weights are 0.14, 0.56, 0.06 and 0.24, and the answer is 11. Raise the top-right corner to 30 and the surface twists; the centre then comes out at 12.5, a quarter of the extra 10.
Frequently asked questions.
Does it matter whether I interpolate in x first or in y first?
Why is bilinear interpolation not a straight line along the diagonal?
Can I use it to read between rows and columns of a steam table?
What if my point lies outside the rectangle?
How is bilinear interpolation used when resizing images?
How accurate is bilinear interpolation for smooth data?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- Weighted blend of q11, q21, q12 and q22 using normalized tx and ty
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled