Linear Interpolation Calculator
Estimate y for a given x between two known points using linear interpolation (LERP).
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Linear Interpolation Calculator
Enter two known data points and a target x value, and the estimated y value appears instantly.
- Enter Known Point 1. Provide the x and y values of the first data point.
- Enter Known Point 2. Provide the x and y values of the second data point.
- Enter Target x. Type the x value where you want to estimate y. If it falls outside the range of your known points, the result is an extrapolation (flagged in the breakdown).
- Read the result. The interpolated y value is displayed along with the parameter t and whether the result is interpolated or extrapolated.
About Linear Interpolation
Linear interpolation (LERP) estimates a value between two known data points by assuming a straight-line relationship. The formula is y = y1 + (x - x1) * (y2 - y1) / (x2 - x1). The parameter t = (x - x1) / (x2 - x1) indicates the relative position: 0 means you are at point 1, 1 means at point 2.
If t is less than 0 or greater than 1, the target x falls outside the known range and the result is an extrapolation rather than interpolation. Extrapolated values become less reliable the farther they extend beyond the data.
Frequently Asked Questions
What is the difference between interpolation and extrapolation?
Interpolation estimates a value within the range of known data points. Extrapolation estimates beyond that range. Interpolation is generally more reliable because you are working within observed data.
What does the parameter t mean?
The parameter t shows how far along the line segment you are. t = 0 means you are at point 1, t = 0.5 means halfway, and t = 1 means at point 2. Values outside 0-1 indicate extrapolation.
When is linear interpolation a good approximation?
Linear interpolation works best when the relationship between points is approximately linear (straight-line). If the data is curved, polynomial or spline interpolation may be more accurate.