Interpolation Calculator
Estimate a value between known data points using linear interpolation.
Inputs
Interpolated y
5.00000000
Slope
3.00000000
Step by step
Values used
x₀ (known) = 1; y₀ = f(x₀) = 2; x₁ (known) = 3; y₁ = f(x₁) = 8; x (target) = 2
Linear interpolation
y = y₀ + (y₁ - y₀) · (x - x₀) / (x₁ - x₀)
Interpolated y
= 5.00000000
Slope
= 3.00000000
How it works
Linear interpolation estimates f(x) between two known points (x₀,y₀) and (x₁,y₁) by drawing a straight line between them: y = y₀ + (y₁-y₀)·(x-x₀)/(x₁-x₀). This is exact for linear functions and a first-order approximation for nonlinear ones.
Formula
Linear interpolation
y = y₀ + (y₁ - y₀) · (x - x₀) / (x₁ - x₀)
- (x₀,y₀)
- First known point
- (x₁,y₁)
- Second known point
- x
- Target x value
Frequently Asked Questions
When is linear interpolation accurate?
When the function is approximately linear between the two points, or when the points are close together. For curved data, use polynomial or spline interpolation.
What about extrapolation?
The same formula works for x outside [x₀,x₁], but accuracy degrades quickly. Extrapolation should be used cautiously.
You might also need
- Lagrange Interpolation CalculatorCommonly used together
- Spline Interpolation CalculatorCommonly used together
- Newton Interpolation CalculatorCommonly used together
- Numerical Integration CalculatorAlso in Numerical Methods
- Bisection Method CalculatorAlso in Numerical Methods
- Newton-Raphson CalculatorAlso in Numerical Methods