🧮
🧮 Math & statistics

Lagrange Error Bound Calculator (Taylor polynomial remainder estimate)

Results update as you type.

Your numbers

Understanding the Lagrange error bound calculator — concept and principle

This calculator bounds the error of a Taylor polynomial approximation with the Lagrange remainder. For sin x, cos x, eˣ or your own bound M, it gives the error bound at a point, the Taylor polynomial value, the true value, the actual error and the smallest degree that meets a tolerance. Use it for calculus homework on Taylor series and numerical approximation.

How far can P₃ be off at x = 0.5?How far can P₃ be off at x = 0.5?M1|x − a|⁴0.0625(n + 1)!24true error 0.0002589 (inside the bound)Error bound1 × 0.0625 ÷ 24 = 0.00260417bound ≤ 0.0001 first reached at degree 5
The bound uses the largest possible next derivative, so the true error is usually smaller.

How it is calculated

f(x) = Pₙ(x) + Rₙ(x), with Rₙ(x) = f⁽ⁿ⁺¹⁾(c) ÷ (n + 1)! × (x − a)ⁿ⁺¹ for some c between a and x

Lagrange error bound: |Rₙ(x)| ≤ M × |x − a|ⁿ⁺¹ ÷ (n + 1)!

The principle

A Taylor polynomial matches a function's value and first n derivatives at the centre a. The error that remains behaves like the next term of the series, but with the derivative evaluated at some unknown point c. Since c is unknown, using the largest possible size of that derivative, M, gives a guaranteed upper limit. The factorial in the denominator grows quickly, which is why a few more terms usually shrink the error dramatically near the centre.

Worked example

Default inputs: f(x) = sin x, a = 0, x = 0.5, n = 3, M = 1, tolerance 0.0001.

  1. (n + 1)! = 4! = 24; |x − a|⁴ = 0.5⁴ = 0.0625; M used 1.
  2. Error bound = 1 × 0.0625 ÷ 24 = 0.00260417.
  3. Taylor polynomial P₃(0.5) = 0.5 − 0.5³ ÷ 6 = 0.4791666667.
  4. True value sin 0.5 = 0.4794255386; actual error = 0.0002589, well inside the bound.
  5. Smallest degree with bound ≤ 0.0001: 5 (bound 0.5⁶ ÷ 720 ≈ 0.0000217).
How Error bound |Rₙ(x)| ≤ changes with Point x where you approximateHow Error bound |Rₙ(x)| ≤ changes with P…00.010.020.030.040.050.1250.250.3750.50.6250.751Example: 0.00260417Point x where you approximate
Each point is the calculator re-run with only “Point x where you approximate” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Point x where you approximateError bound |Rₙ(x)| ≤
0.1250.0000101725
0.250.00016276
0.3750.000823975
0.50.00260417
0.6250.00635783
0.750.0131836
10.0416667

How to read the result

The bound is a worst case. Here the actual error is about ten times smaller, because for sin x the degree-3 and degree-4 polynomials are the same (the x⁴ coefficient is 0). Use the bound to decide how many terms you need for a guaranteed accuracy, not to estimate the exact error.

Common mistakes

Keep in mind: For eˣ and other growing derivatives, M must be taken at the end of the interval farther from zero; a too-small M gives a false guarantee.

Frequently asked questions

What is the Lagrange error bound?

|Rₙ(x)| ≤ M|x − a|ⁿ⁺¹ ÷ (n + 1)!, a guaranteed upper limit on a Taylor polynomial's error.

How do I choose M?

Take the largest absolute value of the (n + 1)-th derivative between a and x.

Why is the actual error smaller than the bound?

The bound assumes the worst possible derivative value; the true one is usually smaller.

Sources: OpenStax, Calculus Volume 2 (2016), §6.3 Taylor and Maclaurin Series

Checked 9 Nov 2026. OpenStax, Calculus Volume 2 (2016), §6.3 Taylor and Maclaurin Series — “Taylor’s Theorem with Remainder” (Rₙ(x) = f⁽ⁿ⁺¹⁾(c)/(n + 1)! · (x − a)ⁿ⁺¹ for some c between a and x; if |f⁽ⁿ⁺¹⁾| ≤ M then |Rₙ(x)| ≤ M/(n + 1)! · |x − a|ⁿ⁺¹), as reproduced in Lumen Learning Calculus II.

🧮 All math & statistics tools →🌍 Calculators by country →