Linear Interpolation Calculator
Estimate a value between two known data points with linear interpolation, or beyond them with extrapolation.
How to use this calculator
Enter two known points (x₁, y₁) and (x₂, y₂) from a table or measurements, and the x value you want. The calculator draws a straight line through the two points and reads off y. It tells you if x lies outside the two points (extrapolation), where results are less reliable.
Formula
y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). Slope m = (y₂ − y₁) ÷ (x₂ − x₁). The relative position t = (x − x₁) ÷ (x₂ − x₁) is between 0 and 1 for interpolation.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewIfrahMSc Mathematics
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
When is linear interpolation accurate?
When the true relationship is close to a straight line between the two points, or when the points are close together.
What is extrapolation?
Estimating outside the known range. It assumes the straight-line trend continues, which is often not true, so treat it with caution.
Where is interpolation used?
Reading values from tables (steam tables, tax tables, statistical tables), estimating missing data, resizing images and animation.
What if x₁ equals x₂?
Then there is no line to follow and the calculator asks for two different x values.
Is there a better method for curves?
Polynomial or spline interpolation through more points can follow curves more closely.
Can I interpolate dates?
Yes, convert dates to day numbers first, interpolate, then convert back.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Olver, F. W. J., Lozier, D. W., Boisvert, R. F., & Clark, C. W. (Eds.). (2024). NIST Digital Library of Mathematical Functions. National Institute of Standards and Technology. View source
- Abramson, J. (2021). College algebra 2e. OpenStax. View source
- Marecek, L., Anthony-Smith, M., & Honeycutt Mathis, A. (2020). Intermediate algebra 2e. OpenStax. View source
- Croarkin, C., & Tobias, P. (Eds.). (2012). NIST/SEMATECH e-handbook of statistical methods. National Institute of Standards and Technology. View source