Math
Bilinear Interpolation Calculator
Enter the four corner values of a grid cell (Q11, Q21, Q12, Q22) and the (x, y) where you need an estimate. mathcheck interpolates along the bottom and top edges, then between those two results, showing every step with exact fractions.
It also reports the weight each corner contributes and warns when the query point falls outside the cell. This is the method used for two-way tables, terrain heights, and image resampling.
Bottom-left corner value.
Bottom-right corner value.
Top-left corner value.
Top-right corner value.
Try an example
Result
Interpolated value f(x, y)
—
- Decimal
- —
- R1 (bottom edge at x)
- —
- R2 (top edge at x)
- —
- Fraction across in x
- —
- Fraction up in y
- —
- Corner weights
- —
More details (1 more)
- Interpolation or extrapolation
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
How bilinear interpolation works
When a quantity depends on two variables and you know it only at the four corners of a rectangle, bilinear interpolation estimates it inside by doing linear interpolation twice: first along the two horizontal edges to get values at your x, then vertically between those two values at your y. Doing the vertical step first gives exactly the same answer.
| Corner | Location | Weight |
|---|---|---|
| Q11 | (x1, y1) | (1 - tx)(1 - ty) |
| Q21 | (x2, y1) | tx (1 - ty) |
| Q12 | (x1, y2) | (1 - tx) ty |
| Q22 | (x2, y2) | tx ty |
Steam-table style lookup
A property is 1 at (0, 0), 2 at (1, 0), 3 at (0, 1), and 4 at (1, 1). At (0.5, 0.5): R1 = 1.5 along the bottom, R2 = 3.5 along the top, and f = 1.5 + 0.5(3.5 - 1.5) = 2.5. Each corner has weight 1/4 at the center.
How to use this calculator
- Enter the two x-values and two y-values that bound your grid cell.
- Enter the four corner values. Q11 is bottom-left (x1, y1), Q21 bottom-right, Q12 top-left, Q22 top-right.
- Enter the query point (x, y).
- Read the interpolated value, then R1 and R2 (the edge values), the fractions tx and ty, and the corner weights.
- Open Show the work to follow both edge interpolations and the final vertical step.
How to read the answer
The answer is exact as a fraction when the inputs are decimals. The four weights add to 1 and show how much each corner influences the result; the nearest corner always has the largest weight. If tx or ty is outside [0, 1] the point is outside the cell and the result is an extrapolation, flagged with a warning.
Common mistakes and edge cases
- Mixing up the corner order. Q21 is at (x2, y1): second x, first y.
- Interpolating in x along one edge and then using a corner instead of the other edge value for the y step.
- Using the cell's edges in the wrong order for tx: it is (x - x1) / (x2 - x1), not divided by x1.
- Applying the method to a query far outside the cell, where the bilinear surface has no reason to match reality.
- Expecting a plane: the bilinear surface is a saddle-shaped patch unless the corner values happen to be coplanar.
Worked examples
Center of the unit cell
Corners 1, 2, 3, 4 at (0.5, 0.5)
Interpolated value f(x, y)
5/2 (2.5)
Two-way table lookup
Temperatures 20 and 30, pressures 100 and 200, values 5, 7, 9, 12 at (25, 150)
Interpolated value f(x, y)
33/4 (8.25)
Query on a corner
At (x2, y2) the answer is Q22
Interpolated value f(x, y)
4
Query on an edge
At (0.25, 0) only the bottom edge matters
Interpolated value f(x, y)
5/4 (1.25)
Negative and decimal values
Corners -2, 0.5, 1, -1 at (0.2, 0.8)
Interpolated value f(x, y)
9/50 (0.18)
Outside the cell
(1.5, 0.5) is beyond x2
Interpolated value f(x, y)
7/2 (3.5)
Degenerate grid
Interpolated value f(x, y)
—
Frequently asked questions
What is bilinear interpolation?+
Linear interpolation applied twice: along two opposite edges of a grid cell to reach your x, then between those results to reach your y. It estimates a function of two variables from four surrounding known values.
Does the order (x first or y first) matter?+
No. Interpolating in y along the left and right edges and then in x gives exactly the same number, because the formula is symmetric in the two directions.
How do I use it with a two-way table?+
Pick the two row values that bracket one input and the two column values that bracket the other. The four table entries where they meet are Q11, Q21, Q12, and Q22.
What do the corner weights mean?+
Each corner contributes its value times a weight between 0 and 1, and the weights sum to 1. A point at the center weights all corners equally; a point near Q22 weights it most.
Can I use it outside the four points?+
The formula still produces a number, but it is an extrapolation and the bilinear surface may not resemble the real function there. The calculator warns when the query is outside the cell.
How is this different from fitting a plane?+
A plane is fixed by three points and would generally miss the fourth corner. The bilinear surface passes through all four corners exactly by including an xy cross term, which makes it curve along diagonals.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Linear Interpolation Calculator
Interpolate a value between two known points with the formula y = y1 + (x - x1)(y2 - y1)/(x2 - x1), exact fractions, the slope and line equation, inverse interpolation (find x for a given y), an extrapolation warning, and a graph.
Average Rate of Change Calculator
Find the average rate of change of a function between two x-values from a polynomial or from two points, with the exact fraction, the secant line equation, and every step.
Slope Calculator
Find slope from two points, solve a missing coordinate from a known slope, or turn an angle or percentage grade into a slope. Includes equations, intercepts, perpendicular slope, graph, and step-by-step work.
Midpoint Calculator
Find the midpoint between two coordinate points with coordinate-average steps.
Proportion Calculator
Solve a missing value in a proportion using cross multiplication with clear substitution steps.
Adding Fractions Calculator
Add up to five fractions or mixed numbers. Finds the least common denominator with prime factors, rewrites each fraction, adds, simplifies, and shows the mixed-number and decimal forms with a fraction-strip picture.
Last updated: September 4, 2026