Interpolation Calculator (Linear)
Estimate an unknown y-value that falls between two known data points. Linear interpolation joins the two points with a straight line and reads the y-value at your chosen x — the quickest way to fill a gap in a table of readings.
Enter Values
How to use this calculator
- Enter the two known points as x1, y1 and x2, y2 (any real numbers, positive or negative).
- Enter the target x where you want to estimate y — ideally somewhere between x1 and x2.
- Read the interpolated y, the slope of the line, and a flag telling you whether your target x is inside the known range (interpolation) or outside it (extrapolation).
How it works
The tool finds the slope of the straight line through the two points, slope = (y2 − y1) / (x2 − x1), then applies y = y1 + slope × (x − x1). Because a single x cannot map to two y-values on a straight line, x1 and x2 must differ. When the target x lies between the two known x-values the result is genuine interpolation; when it lies beyond them the same line is extended, which is extrapolation and carries more uncertainty.
Worked example
Worked example. With points (0, 0) and (10, 100), the slope is (100 − 0) / (10 − 0) = 10. At x = 3 the estimate is y = 0 + 10 × (3 − 0) = 30. Because 3 lies between 0 and 10, this is a reliable interpolation.
Common mistakes
- Using the same value for x1 and x2 — the line becomes vertical and no single y can be read.
- Treating a result outside the known range as trustworthy — beyond [x1, x2] you are extrapolating, not interpolating.
- Assuming the data is linear when it curves; linear interpolation only fits a straight line between the two points.
Frequently asked questions
What is the difference between interpolation and extrapolation?
Interpolation estimates a value inside the range of your known points and is usually reliable. Extrapolation projects the same line beyond your data and is riskier because the trend may not continue.
Can I use negative coordinates?
Yes. All five inputs accept negative numbers, so you can interpolate anywhere on the plane.
Related tools
- Extrapolation Calculator
- Distance Formula Calculator
- Coordinate Geometry Calculator
- Polygon Interior Angle Calculator
- Inverse Trig (arcsin, arccos, arctan) Calculator
- Coulombs Law Calculator
Explore more in Maths, Education & Science.
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



