Lagrange Calculator – Interpolation with Steps & Chart | CalcVelo
📐 Numerical Analysis · Basis Polynomials · Curve Chart · Steps

Lagrange Calculator

Find the Lagrange interpolating polynomial through any set of data points. Get the interpolated value, basis polynomials, step-by-step solution and curve chart — instantly.

Enter Data Points
Add (x, y) pairs — x values must be distinct
Point x value y = f(x)
Max 8 points | Min 2 points
Find L(x) at x = Enter x to interpolate/extrapolate
Examples:

Lagrange Interpolation — Formula & Method

Lagrange interpolation finds the unique polynomial of degree ≤ n−1 that passes through n given data points. It is one of the most fundamental methods in numerical analysis.

L(x) = Σᵢ yᵢ · ℓᵢ(x)
ℓᵢ(x) = Πj≠i (x − xⱼ) / (xᵢ − xⱼ)
where ℓᵢ(xᵢ) = 1 and ℓᵢ(xⱼ) = 0 for j ≠ i

How to Use This Calculator

  • Enter at least 2 data points (x, y) in the table
  • All x values must be distinct (no duplicate x)
  • Enter the target x value to find L(x) at that point
  • Click Calculate to get interpolated value, basis polynomials and steps
  • Maximum 8 data points supported

Applications of Lagrange Interpolation

  • Numerical analysis: Approximating unknown functions from sample data
  • Computer graphics: Smooth curve generation and animation paths
  • Engineering: Data fitting, sensor calibration, signal processing
  • Finance: Yield curve interpolation in bond pricing
  • Physics: Estimating measurements between experimental data points

Lagrange Interpolation Examples

2 points (1,2),(3,4) → L(2) = 3.0 (linear)
3 points y=x²: (1,1),(2,4),(3,9) → L(2.5) = 6.25
4 points y=x³: (1,1),(2,8),(3,27),(4,64) → L(2.5) = 15.625
At data point: L(xᵢ) = yᵢ exactly (always passes through)

Lagrange vs Newton Interpolation

  • Lagrange: Simple formula, easy to understand. Best for small datasets. Requires full recomputation when adding a new point.
  • Newton divided differences: More efficient when adding points incrementally. Same polynomial, different representation.
  • Spline interpolation: Avoids Runge's phenomenon. Better for large datasets. Piecewise polynomial — not one big polynomial.

Key Properties of Lagrange Basis Polynomials

  • ℓᵢ(xᵢ) = 1 — equals 1 at its own data point
  • ℓᵢ(xⱼ) = 0 for j≠i — equals 0 at all other data points
  • Σ ℓᵢ(x) = 1 — basis polynomials always sum to 1
  • Degree of each ℓᵢ(x) = n−1 for n data points

Related Calculators

Also check our Quadratic Equation Calculator, MAD Calculator, Integer Calculator, Long Division Calculator, and all Math Calculators on CalcVelo.

Frequently Asked Questions

Scroll to Top