Lagrange Interpolation Calculator

Fit the unique polynomial through a set of points with Lagrange interpolation, and evaluate it anywhere.

Results

Enter your details and click Calculate to see your results.
About This Calculator

P(x) = Σ yᵢ·Lᵢ(x), where each Lᵢ is 1 at xᵢ and 0 at every other xⱼ. n points give a polynomial of degree at most n − 1.

Example

Example: through (0,1), (1,3), (2,2), (4,5) the polynomial gives P(3) = 1.5.

Assumptions

Up to 12 distinct x values; high-degree fits can oscillate between points.

Frequently Asked Questions

Is the interpolating polynomial unique?

Yes — only one polynomial of degree ≤ n − 1 passes through n points.

Related Calculators

About the Author

Imran Hossain
Imran Hossain

Professional SEO, Digital Marketer Specialist

I am a Certified Google Ads Expert And Professional SEO, Digital Marketing Specialist

View full profile