This calculator performs bilinear interpolation to find an approximate value Z at a specific point (X, Y), based on the known values at four corner points of a rectangular grid.
You need to specify the coordinates of the grid corners (X₁, X₂, Y₁, Y₂), the known values at these four corners (Z₁₁, Z₁₂, Z₂₁, Z₂₂), and the target coordinates (Target X, Target Y) for which you want to find the value.
Formula
The calculation involves two main steps. First, two linear interpolations are performed along the x-axis to find intermediate values R₁ and R₂.
R₁ = Z₁₁ * (1 - dx) + Z₁₂ * dx
R₂ = Z₂₁ * (1 - dx) + Z₂₂ * dx
where dx = (X - X₁) / (X₂ - X₁)
Next, a final linear interpolation is performed along the y-axis using the intermediate values to find the result Z.
Z = R₁ * (1 - dy) + R₂ * dy
where dy = (Y - Y₁) / (Y₂ - Y₁)
Example
Suppose we have the following data grid and want to find the value at the point (X=15, Y=150):
- Grid corners: X₁=10, X₂=20, Y₁=100, Y₂=200
- Known values:
- Z₁₁ (at X=10, Y=100) = 5.2
- Z₁₂ (at X=20, Y=100) = 5.8
- Z₂₁ (at X=10, Y=200) = 6.4
- Z₂₂ (at X=20, Y=200) = 7.2
1. First, calculate the fractional distances:
dx = (15 - 10) / (20 - 10) = 0.5
dy = (150 - 100) / (200 - 100) = 0.5
2. Interpolate along the x-axis:
R₁ = 5.2 * (1 - 0.5) + 5.8 * 0.5 = 5.5
R₂ = 6.4 * (1 - 0.5) + 7.2 * 0.5 = 6.8
3. Interpolate along the y-axis to get the final result:
Z = 5.5 * (1 - 0.5) + 6.8 * 0.5 = 6.15
The interpolated value at the target point is 6.15.