Interpolate values on a 2D grid using bilinear interpolation. Essential for image processing, computer graphics, and scientific data analysis.
Last updated: April 2026 | By Patchworkr Team
Bilinear interpolation estimates unknown values on a 2D grid by using the four nearest known values. It performs linear interpolation first in one direction (x), then in the perpendicular direction (y).
Applications include:
You need four known values arranged at the corners of a rectangle: Q(x₁, y₁), Q(x₂, y₁), Q(x₁, y₂), and Q(x₂, y₂). Why: These corners define your rectangular region and provide the reference values for estimation.
The point (x, y) must fall within the rectangle defined by your corners: x₁ ≤ x ≤ x₂ and y₁ ≤ y ≤ y₂. Why: Interpolation only works within known boundaries. Outside this region, you'd need extrapolation, which is unreliable.
First, linearly interpolate between Q(x₁, y₁) and Q(x₂, y₁) to get R₁. Then interpolate between Q(x₁, y₂) and Q(x₂, y₂) to get R₂. Why: This creates two intermediate values at the target x-coordinate but at the original y-boundaries.
Linearly interpolate between R₁ and R₂ along the y-direction to get your final interpolated value. Why: This completes the 2D interpolation by combining both x and y variations into a single smooth estimated value.
The formula weights each corner value by its distance from the target point. Corners closer to (x, y) have more influence. Why: Distance-based weighting ensures smooth, physically meaningful results—nearby known values should contribute more than distant ones.
Image Upscaling
It's mainly used in image processing (resizing), computer graphics (texture mapping), and scientific data interpolation on 2D grids.
Because it performs linear interpolation twice: once along the x-axis and once along the y-axis.
Yes for smoothness. Bilinear creates smooth transitions while nearest-neighbor produces blocky, pixelated results. But nearest-neighbor is faster.
No. Bilinear interpolation requires a rectangular grid with four known corner values. For irregular data, use other methods like kriging or triangulation.
Bilinear interpolation only works inside the rectangle defined by the four corners. For points outside, use extrapolation (less accurate) or extend your grid.
Bicubic uses 16 points and produces smoother results but is more computationally expensive. Bilinear uses 4 points and is faster but less smooth.
Yes! Trilinear interpolation extends this to 3D (using 8 corner points). Higher dimensions use hypercubic interpolation.
Simple averaging would give the value at the exact center. Bilinear interpolation weights the corners based on distance, giving correct values anywhere in the rectangle.
Related Tools
Calculate average rate of change.
Calculate binocular range.
Calculate conic sections.
Calculate coordinate grid properties.
Calculate linear interpolation.
Calculate mirror equation.