Linear Interpolation Calculator

Interpolate between two points or within a data table.

About this tool

Enter two points and an x value to get the interpolated y, or a target y to find the matching x. Or paste a table of x, y pairs (in any order) and look up any x; the tool picks the bracketing rows and warns when you go outside the data.

How linear interpolation works

Linear interpolation estimates a value between two known data points by assuming a straight line joins them: y = yโ‚ + (x โˆ’ xโ‚)(yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚). Between (10, 20) and (30, 60) the slope is 2, so x = 25 gives y = 50, and working backwards, y = 40 occurs at x = 20. It's used every day for reading between the rows of engineering tables (steam tables, material properties, pipe friction charts), calibration curves, tax and grade bands, growth charts and animation (where it's called 'lerp'). The table mode sorts your data, finds the two rows either side of the x you ask about, and interpolates between them. The default table converts Celsius to Fahrenheit, so 15 gives 59. If x is outside the table, the tool extrapolates from the nearest two points and flags it, because extending a trend beyond the data is much less reliable. Honest limits: interpolation is only as good as the straight-line assumption, so for curved relationships use closely spaced points or a curve fit. The slope calculator and the linear regression calculator are related.

Frequently asked questions

What is the linear interpolation formula?

y = yโ‚ + (x โˆ’ xโ‚)(yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚).

What is the difference between interpolation and extrapolation?

Interpolation estimates between known points; extrapolation goes beyond them and is less reliable.

How do I interpolate in a table?

Find the two rows whose x values bracket your x, then interpolate between them; paste the table here to do it automatically.

When is linear interpolation inaccurate?

When the true relationship curves noticeably between the data points.

Is my data sent anywhere?

No. Everything is calculated in your browser, and nothing is stored or sent.