Calculator: Lagrange interpolation

Interpolate a value from paired data using the Lagrange polynomial.

Value P(x)
3.25

How the calculation works

P(x)=Σyᵢ∏ⱼ≠ᵢ[(x−xⱼ)/(xᵢ−xⱼ)]

Interpolate a value from paired data using the Lagrange polynomial. X values must be distinct; extrapolation and many nodes can amplify oscillations and measurement error.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Worked example: Values (spaces or semicolons; decimal point) X: 0 1 2; Values (spaces or semicolons; decimal point) Y: 0 1 4; Value x: 1.5. Result: Value P(x): 2.25.

Frequently asked questions

How is the result calculated?

P(x)=Σyᵢ∏ⱼ≠ᵢ[(x−xⱼ)/(xᵢ−xⱼ)]

What assumptions apply?

Interpolate a value from paired data using the Lagrange polynomial. X values must be distinct; extrapolation and many nodes can amplify oscillations and measurement error.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Can I check a worked example?

Worked example: Values (spaces or semicolons; decimal point) X: 0 1 2; Values (spaces or semicolons; decimal point) Y: 0 1 4; Value x: 1.5. Result: Value P(x): 2.25.

Also try:

Back to category →