Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

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

Bilinear interpolated value
10
The estimated value at (Target x, Target y), in the same units as the four corner values.

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.

  1. 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.
  2. 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.
  3. Enter Target x and Target y. They must fall within the rectangle, edges included; the page refuses points outside it rather than extrapolating.
  4. 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.

Weighted blend of q11, q21, q12 and q22 using normalized tx and ty

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.

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.

q110
q2220
q2110
q1210
x5
y10
x10
y5
y210
x210

Frequently asked questions.

Does it matter whether I interpolate in x first or in y first?
No. Interpolating along the two horizontal edges and then vertically gives exactly the same result as interpolating along the two vertical edges and then horizontally. Both routes expand to the same four-weight formula, which is why the page only needs the corners and the target.
Why is bilinear interpolation not a straight line along the diagonal?
Because the formula includes a term in tx·ty. Take corners of 0, 0 and 0 with 10 at the top right: at the centre the answer is 2.5, not the 5 a straight line from 0 to 10 along the diagonal would give. Along that diagonal the values grow with the square of the distance.
Can I use it to read between rows and columns of a steam table?
Yes, that is one of its most common uses. For superheated steam, take the two tabulated pressures and two temperatures that bracket your state, enter the property values at those four combinations, and interpolate. Engineering courses often call this double interpolation.
What if my point lies outside the rectangle?
The page refuses it. The same formula could be pushed outside the cell, but extrapolated values can drift far from reality, especially when the twist term is large. Choose the grid cell that actually contains your point, or extend the table, instead.
How is bilinear interpolation used when resizing images?
Each pixel of the resized image maps back to a position between four pixels of the original, and its colour is blended from them with these weights, channel by channel. The result is smoother than copying the nearest pixel but softer than bicubic resampling, which draws on a 4 × 4 block of sixteen pixels.
How accurate is bilinear interpolation for smooth data?
For a smoothly varying quantity the error shrinks roughly with the square of the grid spacing, so halving the spacing in both directions typically cuts the error to about a quarter. Sharp peaks, kinks or phase boundaries inside a cell are not captured at all.

How this page was produced

Published by
Quanta Calculator
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
Coming soon