📍 Interpolation Calculator (Linear & Lagrange)

Estimate y for an x between two known points — or through a whole table of points.

No ratings yet — be the first

Enter details

Overrides x₁…y₂.

Log in or create a free account to save your inputs and results, so you don't have to enter them again next time.🔒 No spam, ever. We never sell or share your details, and you can delete your history or account at any time. Privacy policy

Fill in the details and click Calculate to see your results.

Formula at a glance

Interpolation Calculator: Linear interpolation — y = y₁ + (x − x₁)·(y₂ − y₁)/(x₂ − x₁). Example: Between (2, 4) and (3, 9) → Interpolated y at x = 2.5: 6.5
How the Interpolation Calculator works: Linear interpolation — y = y₁ + (x − x₁)·(y₂ − y₁)/(x₂ − x₁)

Rate this calculator

Was it useful? A quick star rating helps others — and you can leave a comment too.
Rate it: ★ ★ ★ ★ ★

📘 About the Interpolation Calculator

Interpolation estimates an unknown value that lies between known data points. Linear interpolation joins two neighbouring points with a straight line — the everyday method for reading statistics tables, steam tables, tax slabs and survey data. Lagrange interpolation fits one smooth polynomial through all the points.

Enter two points and the x you want, or paste a list of points. The calculator shows the linear formula with your numbers, the Lagrange polynomial through all the points (with its equation when the x values are whole numbers), warns when you are extrapolating outside the data, and graphs both.

🧮 Formula

Linear interpolation
y = y₁ + (x − x₁)·(y₂ − y₁)/(x₂ − x₁)
Lagrange polynomial
P(x) = Σ yᵢ·Π (x − xⱼ)/(xᵢ − xⱼ)

✏️ Worked examples

Between (2, 4) and (3, 9)

You enter
x₁2
y₁4
x₂3
y₂9
Find y at x =2.5
MethodLinear (straight line between neighbours)
You get
Interpolated y at x = 2.56.5
Linear interpolationy = y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁) = 4 + (2.5 − 2)(9 − 4)/(3 − 2) = 6.5
Slope between the two points5

y = 6.5.

Through 4 points on y = x²

You enter
x₁2
y₁4
x₂3
y₂9
Find y at x =2.5
Or many points (optional)1,1; 2,4; 3,9; 4,16
MethodPolynomial through all points (Lagrange)
You get
Interpolated y at x = 2.56.25
Linear interpolationy = y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁) = 4 + (2.5 − 2)(9 − 4)/(3 − 2) = 6.5
Polynomial (Lagrange) through all 4 points6.25 — y = x²
Slope between the two points5

y = 6.25.

🧭 How to use this calculator

What you enter

  • x₁
  • y₁
  • x₂
  • y₂
  • Find y at x =
  • Or many points (optional)Overrides x₁…y₂.
  • Method

What you get

  • Interpolated y at x = 2.5
  • Linear interpolation
  • Slope between the two points

❓ Frequently asked questions

What is linear interpolation?

Assuming a straight line between two known points: halfway between x₁ and x₂, y is halfway between y₁ and y₂.

What is the difference between interpolation and extrapolation?

Interpolation estimates inside the range of the data; extrapolation goes beyond it and is much less reliable.

When should I use polynomial interpolation?

For smooth data with a few points. With many points high-degree polynomials can wiggle — use linear or spline interpolation instead.