Scientific Converters Precise unit conversions for science & engineering.

    Loading…

    Lagrange Interpolation Calculator

    Lagrange’s polynomial passes through every data point: through the cubes of 1–4 it gives P(2.5) = 15.625, exactly 2.5³.

    P(2.5) =

    15.625

    Full answer, then cut to fewer decimals (not rounded):

    • 15.625
    • 15.62
    • 15.6
    Interpolating polynomial
    P(x) = x^3
    Degree
    3
    Lagrange basis values at the point
    ixᵢyᵢLᵢ(x)yᵢ·Lᵢ(x)
    011-0.0625-0.0625
    1280.56254.5
    23270.562515.1875
    3464-0.0625-4
    Step-by-step solution
    1. P(x) = Σ yᵢ·Lᵢ(x), Lᵢ(x) = Π (x − xⱼ)/(xᵢ − xⱼ) for j ≠ i
    2. P(2.5) = 1×-0.0625 + 8×0.5625 + 27×0.5625 + 64×-0.0625
    3. = 15.625

    Lagrange Interpolation Formula

    P(x) = Σ yᵢ Π (x − xⱼ)/(xᵢ − xⱼ)

    degree ≤ n − 1 through n points

    Worked Example

    The points (1, 1), (2, 8), (3, 27), (4, 64) at x = 2.5:

    1. P(x) = Σ yᵢ·Lᵢ(x), Lᵢ(x) = Π (x − xⱼ)/(xᵢ − xⱼ) for j ≠ i
    2. P(2.5) = 1×-0.0625 + 8×0.5625 + 27×0.5625 + 64×-0.0625
    3. = 15.625

    Degree: 3

    Lagrange basis values at the point
    ixᵢyᵢLᵢ(x)yᵢ·Lᵢ(x)
    011-0.0625-0.0625
    1280.56254.5
    23270.562515.1875
    3464-0.0625-4

    GATE tip

    For two points Lagrange reduces to linear interpolation: y = y₀ + (y₁ − y₀)(x − x₀)/(x₁ − x₀), the most common GATE interpolation question.

    More Numerical Methods Calculators

    All GATE Engineering Mathematics calculators →

    Frequently asked questions

    When should I use Lagrange rather than Newton interpolation?

    Lagrange works directly for unequally spaced points; Newton’s divided differences are easier to extend when a point is added.

    Is the interpolating polynomial unique?

    Yes: through n points with distinct x there is exactly one polynomial of degree ≤ n − 1, so Lagrange and Newton give the same answer.

    Sources

    Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.

    Cite this page

    APA

    Scientific Converters. (2026, October 15). Lagrange Interpolation Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/lagrange-interpolation-calculator/

    IEEE

    Scientific Converters, "Lagrange Interpolation Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/lagrange-interpolation-calculator/

    Send feedback

    Found a wrong value, a missing unit or an idea? Tell us. We read every message.

    What is it about?

    We store your message, the page you were on and your email if given. See the privacy policy.