Quadratic Interpolation Calculator
Estimate y at a new x from three known points, using the Lagrange form of the interpolating parabola.
Your Values
Try an example
Visualization
Results
Step-by-Step Solution
How Quadratic Interpolation Calculator Works?
The quadratic interpolation calculator builds 3 Lagrange basis polynomials from the x values, weights each one by its y value, and adds them to get the parabola through all 3 points.
- Enter 3 points and a target x
- Build L₀, L₁ and L₂
- Evaluate each basis at the target x
- Multiply by y₀, y₁ and y₂
- Add the 3 products
- Plot the curve and the estimate
Each dashed curve is 1 weighted basis polynomial. The 3 dashed curves add up to the solid parabola, and the amber point marks the estimate at the target x.
Quadratic Interpolation Formula
The quadratic interpolation formula is P(x) = y₀L₀(x) + y₁L₁(x) + y₂L₂(x), with L₀(x) = (x − x₁)(x − x₂) / ((x₀ − x₁)(x₀ − x₂)).
P(x) = y₀L₀(x) + y₁L₁(x) + y₂L₂(x)
- L₀(x)
- (x − x₁)(x − x₂) / ((x₀ − x₁)(x₀ − x₂))
- L₁(x)
- (x − x₀)(x − x₂) / ((x₁ − x₀)(x₁ − x₂))
- L₂(x)
- (x − x₀)(x − x₁) / ((x₂ − x₀)(x₂ − x₁))
- Error
- f‴(ξ)/6 · (x − x₀)(x − x₁)(x − x₂)
Worked Example: (1, 2), (3, 8), (5, 7) at x = 4
- L₀(4) = (1)(−1) / ((−2)(−4)) = −0.125.
- L₁(4) = (3)(−1) / ((2)(−2)) = 0.75.
- L₂(4) = (3)(1) / ((4)(2)) = 0.375.
- P(4) = 2(−0.125) + 8(0.75) + 7(0.375) = 8.375.
Quadratic Interpolation Calculator FAQ
What Is the Difference Between Interpolation and Extrapolation?
Interpolation estimates a value between the known points, and extrapolation estimates a value outside them. Extrapolation is less reliable.
Is Quadratic Interpolation Better Than Linear Interpolation?
Yes, quadratic interpolation is more accurate for curved data, as it uses 3 points and follows the curvature that a straight line misses.
Do the x Values Need Equal Spacing?
No, the Lagrange form works for any 3 different x values.
What Is the Difference Between Interpolation and Regression?
Interpolation passes through every point exactly, and regression finds the best curve near all the points.
How Accurate Is Quadratic Interpolation?
The error is f‴(ξ)/6 · (x − x₀)(x − x₁)(x − x₂), so the estimate is exact for any quadratic and very close for smooth data near the points.