3-Point Lagrange Polynomial Interpolation & Divided Difference Calculator

Interpolate y(x*) through 3 points using Lagrange basis polynomials L₀(x), L₁(x), L₂(x).

Interpolated Value P(1.5)
6.5 y(x*)
1st Divided Difference f[0,1] 2.5 slope
2nd Divided Difference f[0,1,2] (a₂) 1 curvature
Midpoint Linear Interpolation (x₀..x₂) 7.25 linear
Inputs
⚡ Scenarios:
y(0)
Ordinate y₀ at x₀ = 0.
y(1)
Ordinate y₁ at x₁ = 1.
y(2)
Ordinate y₂ at x₂ = 2.
x*
Target abscissa x* to interpolate.
Results & Graph
Interpolated Value P(1.5)
6.5 y(x*)
1st Divided Difference f[0,1]
2.5 slope
2nd Divided Difference f[0,1,2] (a₂)
1 curvature
Midpoint Linear Interpolation (x₀..x₂)
7.25 linear

Interpolated Value P(1.5)

Graph 1 • Lagrange Interpolation • Domain Architecture & Live Telemetry Maps Y At X0 Equals0, Y At X1 Equals1, Y At X2 Equals2 through Lagrange Interpolation Formula.
Interpolated Value P(1.5): 6.5 y(x*) Lagrange Interpolation • Invariants & Metrics Interpolated Value P(1.5) 6.5 y(x*) 1st Divided Difference f[0,1 2.5 slope 2nd Divided Difference f[0,1 1 curvature Midpoint Linear Interpolatio 7.25 linear
Graph 2 • Interpolated Value P(1.5) Across Y At X0 Equals0 Sweep (40% → 160%) Evaluates P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂ across 7 operating points (current input highlighted).
0 y(x*) 3.66 y(x*) 7.32 y(x*) 6.65 0.800y(0) 6.60 1.20y(0) 6.55 1.60y(0) 6.50 2y(0) 6.45 2.40y(0) 6.40 2.80y(0) 6.35 3.20y(0)
Graph 3 • Joint Sensitivity: Y At X0 Equals0 × Y At X1 Equals1 Compares Interpolated Value P(1.5) when Y At X1 Equals1 is shifted +25% (solid) vs. −25% (dashed).
0 y(x*) 4.08 y(x*) 8.16 y(x*) --- Y At X1 Equals1 @ 75% 7.42 -30% 7.38 -15% 7.34 +0% 7.31 +15% 7.27 +30%
Summary: At x* = 1.5, Lagrange basis weights are L₀=-0.125, L₁=0.75, L₂=0.375, yielding P(1.5) = 6.5.
Summary: At x* = 1.5, Lagrange basis weights are L₀=-0.125, L₁=0.75, L₂=0.375, yielding P(1.5) = 6.5.
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: Lagrange Interpolation Formula

P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁))
P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁))
  • yAtX0Equals0: Y At X0 Equals0 (y(0))
  • yAtX1Equals1: Y At X1 Equals1 (y(1))
  • yAtX2Equals2: Y At X2 Equals2 (y(2))
  • queryTargetX: Query Target X (x*)

Rounding: Internal floating-point calculations run in 64-bit IEEE-754 double precision; display values round to 2–4 decimal places.

Worked Example: Worked Mathematical Example: Lagrange Interpolation

Interpolate y(x*) through 3 points using Lagrange basis polynomials L₀(x), L₁(x), L₂(x).

  1. Specify the function parameters, matrix entries, or confusion matrix counts.
  2. Apply the closed-form or iterative formula: P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁)).
  3. Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Lagrange Interpolation via P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁)).

Frequently Asked Questions

How does the 3-Point Lagrange Polynomial Interpolation & Divided Difference Calculator compute the solution?

It evaluates P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁)) directly in your browser and updates three custom SVG visualizations in real time.

Can I solve backwards for an input parameter using Goal Seek?

Yes. Click "🎯 Goal Seek" in the results toolbar to solve backwards for any numeric input field.

Does this calculator run locally offline?

Yes. All calculations run 100% locally in your browser and work offline via the CalculatorGraph PWA.

Mathematics & Statistics · Numerical Analysis & Calculus

3-Point Lagrange Polynomial Interpolation & Divided Difference Calculator: inputs, method, and how to read the result

Interpolate y(x*) through 3 points using Lagrange basis polynomials L₀(x), L₁(x), L₂(x).

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • Y At X0 Equals0: Ordinate y₀ at x₀ = 0.
  • Y At X1 Equals1: Ordinate y₁ at x₁ = 1.
  • Y At X2 Equals2: Ordinate y₂ at x₂ = 2.
  • Query Target X: Target abscissa x* to interpolate.

What the calculation includes

With the default values shown, Interpolated Value P(1.5) is 6.5 y(x*). The calculation follows Lagrange Interpolation Formula; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing Y At X0 Equals0 from 2 y(0) to 3 y(0) changes Interpolated Value P(1.5) from 6.5 y(x*) to 6.375 y(x*). This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
  • Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.

Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.

More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.