Skip to content

Linear Interpolation Calculator

Interpolate between two points or in a pasted table, find x for a given y, and do bilinear interpolation in 2-D tables, with the formula, a graph and extrapolation warnings.

Calculator Details

y at x = 14:62See results ↓

Between two points, x from y, in a table, x from y in a table, or in a 2-D table (bilinear)

First known point

Value at x₀

Second known point

Value at x₁

Where you want the value

Your Results

y at x = 14: 62

y at x = 14

62

Between (10, 50) and (20, 80)

Slope

3

Δy ÷ Δx of the segment used

Fraction along the segment

0.4

t = 0 at the first point, 1 at the second

At x = 14, linear interpolation between (10, 50) and (20, 80) gives y = 62.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Known points and the interpolated value

Known points and the interpolated value

Detailed Breakdown

Known points
xyUsed
1050Segment used
2080Segment used

How This Calculator Works

How it's calculated

y = y₀ + (x − x₀)(y₁ − y₀) ÷ (x₁ − x₀)

Your numbers: y = 50 + (14 − 10) × (80 − 50) ÷ (20 − 10) = 50 + 0.4 × (80 − 50) = 62.

Frequently Asked Questions

What is the linear interpolation formula?

y = y₀ + (x − x₀) × (y₁ − y₀) ÷ (x₁ − x₀). It finds the y on the straight line through (x₀, y₀) and (x₁, y₁) at your x. Between (10, 50) and (20, 80), x = 14 is 40% of the way across, so y = 50 + 0.4 × 30 = 62.

What is the difference between interpolation and extrapolation?

Interpolation estimates a value between known points; extrapolation extends the line beyond them. The formula is the same, but extrapolation is much riskier because the data may curve outside the range you measured. The calculator flags any extrapolated result.

How do I interpolate in a table?

Find the two rows whose x-values bracket your x, then interpolate between just those two rows. Paste the table with one x, y pair per line (a spreadsheet copy works); the calculator sorts the rows, picks the right segment and highlights it.

How do I find x for a given y?

Swap the roles of x and y: x = x₀ + (y − y₀) × (x₁ − x₀) ÷ (y₁ − y₀). This is inverse interpolation, used for example to find the temperature at which a property reaches a target value. In a table it uses the first segment whose y-values contain the target, so make sure y only rises or only falls over the range you care about.

What is bilinear interpolation?

Interpolation in a two-way table, such as steam tables, wind-chill or loan tables: interpolate along x on the two bracketing rows, then along y between those results. In one formula, f = (1 − t)(1 − u)Q₁₁ + t(1 − u)Q₂₁ + (1 − t)uQ₁₂ + tuQ₂₂, where t and u are the fractions of the way across the cell in x and y.

How accurate is linear interpolation?

It is exact for data that really is linear, and for smooth data its error is at most (h²/8) × max|f″| over an interval of width h. Halving the table spacing cuts the error about four times. For strongly curved data, a quadratic or spline interpolation is more accurate.

Is linear interpolation the same as a weighted average?

Yes. With t = (x − x₀)/(x₁ − x₀), the result is (1 − t)·y₀ + t·y₁: a weighted average of the two known values, with more weight on the one x is closer to. At t = 0.5 it is the plain average.

Included: linear interpolation and extrapolation between two points, inverse interpolation (x for a given y), piecewise-linear lookup in a pasted table of up to 200 rows (in either direction), and bilinear interpolation in one cell of a two-dimensional table (Burden, Faires and Burden, Numerical Analysis, ch. 3). Decimal arithmetic, so table values come back exactly. Left out: polynomial (Lagrange, Newton) and spline interpolation, interpolation on logarithmic scales, and finding the right cell in a full 2-D table (enter the four surrounding values).

Linear Interpolation Calculator: Between Points, in Tables and Bilinear

By FindMySum · Last reviewed

A linear interpolation calculator estimates a value between two known points by assuming a straight line between them. It is the everyday way to read between the lines of a table: a tax table, a steam table, a growth chart, a price list. This page interpolates between two points, looks up a value in a whole pasted table, works backwards to find x for a given y, warns you when a point is outside the data (extrapolation), and does bilinear interpolation in two-way tables.

The formula

Given two points (x₀, y₀) and (x₁, y₁), the value at x is

y = y₀ + (x − x₀) × (y₁ − y₀) ÷ (x₁ − x₀).

Read it as: start at y₀, then move along the line by the slope (y₁ − y₀) ÷ (x₁ − x₀) for a distance of x − x₀.

Worked example with the defaults

The known points are (10, 50) and (20, 80), and we want y at x = 14.

  1. Slope: (80 − 50) ÷ (20 − 10) = 3 per unit of x.
  2. Distance from x₀: 14 − 10 = 4.
  3. Result: y = 50 + 4 × 3 = 62.

Another way to see it: 14 is 40% of the way from 10 to 20 (t = 0.4), so y is 40% of the way from 50 to 80: 50 + 0.4 × 30 = 62. Linear interpolation is a weighted average, y = (1 − t)·y₀ + t·y₁.

Interpolating in a table

With a whole table, find the two rows that bracket x and interpolate between those. The default table is:

xy
00
1015
2035
3060

For x = 25, the bracketing rows are (20, 35) and (30, 60). The slope is 2.5, so y = 35 + 5 × 2.5 = 47.5. Paste your own table with one pair per line; rows can be in any order, separated by commas, spaces or tabs. The calculator highlights the segment it used, and the chart shows the whole piecewise-linear curve.

Inverse interpolation: x for a given y

Sometimes you know the target value and need the input that produces it: the temperature at which pressure reaches a limit, or the dose that gives a 50% response. Swap the roles of x and y:

x = x₀ + (y − y₀) × (x₁ − x₀) ÷ (y₁ − y₀).

Between (10, 50) and (20, 80), y = 70 is reached at x = 10 + 20 × 10 ÷ 30 = 16.67. In the table, y = 50 falls between 35 and 60, so x = 20 + 15 × 10 ÷ 25 = 26.

Extrapolation

If x is outside the known range, the same formula extends the line beyond the data. The calculator still gives an answer but marks it as extrapolated. Be careful: real relationships often bend. Between (10, 50) and (20, 80), x = 25 extrapolates to 95, which is only right if the line really continues.

Bilinear interpolation for two-way tables

Some tables have two inputs, one along the rows and one along the columns. Bilinear interpolation uses the four values around your point:

  • Q₁₁ = f(x₁, y₁), Q₂₁ = f(x₂, y₁), Q₁₂ = f(x₁, y₂), Q₂₂ = f(x₂, y₂);
  • t = (x − x₁) ÷ (x₂ − x₁) and u = (y − y₁) ÷ (y₂ − y₁);
  • f = (1 − t)(1 − u)·Q₁₁ + t(1 − u)·Q₂₁ + (1 − t)u·Q₁₂ + tu·Q₂₂.

The default cell has x from 14 to 15, y from 20 to 21, and corner values 91, 210, 162 and 95. At (14.5, 20.2), t = 0.5 and u = 0.2, so

f = 0.4 × 91 + 0.4 × 210 + 0.1 × 162 + 0.1 × 95 = 36.4 + 84 + 16.2 + 9.5 = 146.1.

How accurate is it?

Linear interpolation is exact when the underlying relationship is a straight line. For a smooth curve, the error over an interval of width h is at most h²/8 times the largest value of the second derivative. Two practical consequences:

  • Closely spaced tables interpolate well; widely spaced ones less so.
  • Halving the spacing makes the error about four times smaller.

For strongly curved data, or when you need a smooth curve rather than straight segments, use a quadratic or spline interpolation instead.

Common mistakes

  • Mixing up x and y in the inverse formula.
  • Using rows that don't bracket x, which turns an interpolation into an extrapolation.
  • Interpolating on a log scale linearly: values such as pH, decibels or compound growth should be interpolated in the units of the scale they vary linearly on.

More questions

When should I use interpolation instead of regression?

Interpolate when the table values are exact or trusted and you want a value between them, such as a tax table, a steam table or a manufacturer's chart. Use regression when the data are noisy measurements and you want the trend through all of them: a regression line usually doesn't pass through any point exactly.

Can I interpolate dates or times?

Yes, if you convert them to numbers first, for example days since a start date or hours since midnight. Interpolating a value at 14:30 between readings at 14:00 and 15:00 uses t = 0.5.

Why do engineering tables need bilinear interpolation?

Many properties depend on two inputs at once. Superheated steam enthalpy depends on pressure and temperature, wind chill on air temperature and wind speed, and beam capacity on span and depth. A table gives values on a grid, and bilinear interpolation reads between both the rows and the columns.

Does the order of interpolation matter in bilinear interpolation?

No. Interpolating along x first and then y gives exactly the same answer as y first and then x. The combined formula is symmetric in the two directions, which is why it can be written as a single weighted average of the four corners.

What happens if my table has the same x twice?

The calculator rejects it, because a function can't have two different y-values at one x and the slope between them would be undefined. Remove the duplicate or average the two values first.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy