Find y from x
y = y₁ + ((x − x₁) / (x₂ − x₁)) × (y₂ − y₁)Calculate an unknown x or y between two known points with inverse interpolation, formula steps, line details, and extrapolation warnings.
Estimate a value between two known coordinates in three quick steps. The calculator also supports inverse interpolation when y is known.
Choose whether to find y from x or find x from y.
Enter the first known coordinate (x₁, y₁).
Enter the second known coordinate (x₂, y₂).
Add the known target value and select the display precision.
Review the result, position ratio, line equation, graph, and calculation steps.
Linear interpolation estimates a value on the straight line connecting two known points. It assumes a constant rate of change across the selected interval.
NIST linear interpolation formulaUse the forward equation to find y, or the inverse equation to find x. The position factor t expresses the target as a percentage of the interval.
Find y from x
y = y₁ + ((x − x₁) / (x₂ − x₁)) × (y₂ − y₁)Inverse interpolation
x = x₁ + ((y − y₁) / (y₂ − y₁)) × (x₂ − x₁)Calculate t = (x − x₁) / (x₂ − x₁) to locate the target within the interval.
Multiply t by the difference between y₂ and y₁.
Add y₁ to obtain the interpolated result.
A t value below 0 or above 1 indicates extrapolation.
A sensor reads 10 units at x = 0 and 30 units at x = 100. Estimate the reading at x = 40.
Values follow the equation y = 0.2x + 10.
| x value | Position | Interpolated y |
|---|---|---|
| 0 | 0% | 10 |
| 25 | 25% | 15 |
| 40 | 40% | 18 |
| 75 | 75% | 25 |
| 100 | 100% | 30 |
Reliability
The method is exact when the underlying relationship is linear. For curved data it is an approximation, and using the nearest surrounding points usually reduces error.
SciPy interpolation guidePro tip
“For table data, use the nearest two rows that surround the target instead of distant points.”
Practical uses
Two-point interpolation is commonly used to estimate values in lookup tables, measurements, spreadsheets, and systems with locally linear change. For a technical implementation reference, see MathWorks' one-dimensional data interpolation.
Essential answers about interpolation formulas, inverse calculations, and table values.
For a known x, use y = y₁ + ((x − x₁) / (x₂ − x₁)) × (y₂ − y₁). It finds how far x lies between x₁ and x₂, then applies that same proportion to the y interval.
Yes. The formulas work when x or y decreases from the first point to the second. You do not need to reorder the points.
Yes. If the target is outside the known interval, the calculator returns the straight-line extrapolation and displays a warning because uncertainty may be greater.
If x₁ equals x₂, the two points form a vertical line and y cannot be expressed as a unique function of x. In inverse mode, y₁ and y₂ must differ for the same reason.
Inverse linear interpolation finds x for a known y. It applies the same position ratio to the x interval using x = x₁ + ((y − y₁) / (y₂ − y₁)) × (x₂ − x₁).
The position ratio t shows how far the target lies from the first point toward the second. For example, t = 0.4 means the target is 40% of the way between the endpoints.
Yes. LERP is a common abbreviation for linear interpolation, especially in software development, computer graphics, games, and animation.
Choose the two adjacent table rows that surround the target, use them as the first and second known points, and enter the target value. Avoid using distant rows when closer surrounding values are available.
Calculate curved grades using the square root grading method.
Calculate linear footage from inches, feet, yards, centimeters, or meters with optional waste allowance.
Convert project area to linear footage using material width and an optional waste allowance.
Easily convert common fractions to their decimal equivalents.
Calculate precise square roots and discover simplified radicals.