Linear Interpolation Calculator
Given two known (x, y) pairs, estimate any intermediate (or extrapolated) value by assuming the relationship between them is a straight line.
y lying on the straight line between the two known points
- 1
Δy = y₂ − y₁
50 − 10 = 40 - 2
Δx = x₂ − x₁
10 − 0 = 10 - 3
Slope = Δy ÷ Δx
40 ÷ 10 = 4 - 4
y = y₁ + slope × (x − x₁)
10 + 4 × (4 − 0) = 26
How does this calculator work?
Linear interpolation estimates y on the straight line between two known points: y = y₁ + (x − x₁) × (y₂ − y₁) / (x₂ − x₁). Enter two (x, y) data pairs and the x you need — values inside the interval are interpolated; values outside are extrapolated and less reliable.
Formula
How this is calculated
Linear interpolation draws a straight line through two known points (x₁, y₁) and (x₂, y₂) and reads off the y value at any x along that line. The formula y = y₁ + (x − x₁) × (y₂ − y₁) / (x₂ − x₁) is the point-slope form of a line written in terms of the two endpoints. Equivalently, using the normalised parameter t = (x − x₁)/(x₂ − x₁), the result is y = y₁ + t × (y₂ − y₁), where t = 0 gives y₁ and t = 1 gives y₂.
When x falls between x₁ and x₂ (0 ≤ t ≤ 1) the operation is called interpolation, and the estimate is generally reliable if the two reference points are close together relative to any underlying curvature. When x is outside that range (t < 0 or t > 1) the same line is extended beyond the data — this is extrapolation, which can diverge rapidly from the true value if the data is not linear over that range.
Linear interpolation is the simplest member of polynomial interpolation and is used everywhere: reading off values from printed tables, animating between keyframes (LERP in game engines), resampling signals, and as a building block inside more complex methods such as bilinear interpolation for 2-D grids and cubic spline interpolation.
Frequently asked questions
Interpolation estimates a value at an x inside the range [x₁, x₂] (0 ≤ t ≤ 1). Extrapolation extends the line beyond the known range; because the straight-line assumption may not hold there, results are less reliable and should be treated with caution.
When the true relationship between x and y is curved — for example, exponential growth, trigonometric functions, or data with peaks — linear interpolation underestimates or overestimates significantly. Cubic spline or quadratic interpolation provides better accuracy in those cases.
t = (x − x₁)/(x₂ − x₁) normalises the position of x in the interval. t = 0 means x is at x₁, t = 0.5 means halfway between the two points, and t = 1 means x is at x₂. It is the "blend factor" used in game-engine LERP functions.
Also known as
TG we-Calculate Editorial Team. (2026). Linear Interpolation Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/linear-interpolation-calculator
TG we-Calculate Editorial Team. "Linear Interpolation Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/linear-interpolation-calculator.
TG we-Calculate Editorial Team, "Linear Interpolation Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/linear-interpolation-calculator
@misc{wecalculate_linear_interpolation_calculator, title = {Linear Interpolation Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/linear-interpolation-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
