Skip to content

Bilinear interpolation calculator

Estimate a value inside an axis-aligned rectangle from its four corner values.

Rectangle, corner values, and target

Your data stays in this browser.

10203040x₁x₂y₂y₁
What this calculator findsFour known corner values surround a point. The diagram blends them to estimate the value at that point as you type.
Known corner valuesPosition to estimate

Inputs

Corner values

The grid shows each value at its actual corner: top uses y₂ and bottom uses y₁.

Target point

Result

Your result will appear here

Enter the values, then select Calculate.

How to use the Bilinear interpolation calculator

Define the rectangle

Enter x₁ < x₂ and y₁ < y₂ to define an axis-aligned rectangle. Put the four known values into the matching 2×2 corner grid, where Q₁₂ is top-left and Q₂₁ is bottom-right.

Enter a target (x, y) inside or exactly on the rectangle. Targets outside are rejected so this page performs interpolation only.

Two linear passes

First calculate tₓ = (x − x₁)/(x₂ − x₁) and blend Q₁₁ with Q₂₁ along the bottom edge, then Q₁₂ with Q₂₂ along the top edge. Blend those two intermediate values using tᵧ = (y − y₁)/(y₂ − y₁).

The equivalent weighted formula is Q = (1−tₓ)(1−tᵧ)Q₁₁ + tₓ(1−tᵧ)Q₂₁ + (1−tₓ)tᵧQ₁₂ + tₓtᵧQ₂₂.

Check the answer

At a corner the result exactly equals that corner value. At the center of a rectangle, each corner receives equal weight, so the result is their average.

This calculator handles one rectangular cell. It does not process images, three-dimensional grids, irregular quadrilaterals, or files.

Worked examples

Center of a square

For axes 0 to 10 and corner values 10, 20, 30, and 40, target (5, 5) gives 25.

A corner exactly

With the same rectangle, target (0, 0) returns Q₁₁ exactly and target (10, 10) returns Q₂₂.

Off-center point

For a 0-to-2 square with Q₁₁=0, Q₂₁=10, Q₁₂=20, Q₂₂=30, target (0.5, 0.5) gives 7.5.

Uses and limits

Good uses

Use it for a value inside one rectangular lookup-table cell when four surrounding corner readings are known.

Important limits

Axes must increase from the first bound to the second, and the target must remain inside the rectangle. This is not an image-resizing, 3D, general-grid, or file-processing tool.

Frequently asked questions

Why must x₁ < x₂ and y₁ < y₂?

That ordering keeps the displayed corner positions and interpolation weights unambiguous.

Are boundary targets allowed?

Yes. A boundary target becomes linear interpolation along one edge.

What happens at a corner?

The corresponding corner receives weight 1 and the other corners weight 0.

Does x-first differ from y-first?

No. Both orders produce the same bilinear value.

Can I use a rotated rectangle?

No. The inputs describe an axis-aligned rectangle only.