Taylor Series Degree & Error Bound Calculator
Enter a function, expansion center, evaluation point, and error tolerance. The calculator checks the selected Taylor degree and finds the smallest supported degree whose Lagrange bound meets the tolerance.
Minimum degree for target error6
- Taylor approximation at selected degree
- 2.72
- Actual error at selected degree
- 0
- Lagrange error bound at selected degree
- 0
- Terms required
- 7
- Error bound at minimum degree
- 0
- Previous degree's error bound
- 0
- Guaranteed value interval
- [2.7175162, 2.7185949]
Angles for sine and cosine are in radians.
The Lagrange value is a guaranteed upper bound when the derivative bound is valid on the interval from a to x.
How to use this calculator
- Choose e^x, sine, cosine, or a custom next-derivative bound.
- Enter the expansion center a and the evaluation point x, using radians for sine and cosine.
- Enter the degree you want to check and the maximum acceptable error.
- For a custom function, enter a derivative bound that is valid on the whole interval from a to x.
- Read the guaranteed bound, minimum degree, terms required, and interval around the minimum-degree approximation.
How the Taylor error bound is calculated
Taylor's theorem separates an approximation into the Taylor polynomial and a remainder. If P_n(x) is the degree-n Taylor polynomial about a, the Lagrange remainder satisfies:
|R_n(x)| <= M |x - a|^(n + 1) / (n + 1)!
Here M is an upper bound for the absolute value of the next derivative on the closed interval between a and x. This calculator calls the right side B_n. For e^x, it uses M = e^max(a,x). For sin(x) and cos(x), it uses M = 1, since every derivative is another sine or cosine with absolute value at most 1.
The selected degree is checked directly. The reverse calculation starts at degree 0 and finds the first degree m for which B_m <= eps, where eps is the target error. The calculator evaluates the bound with logarithms, using log(B_n) = log(M) + (n + 1)log(|x - a|) - log((n + 1)!), so very large powers and factorials do not overflow during the degree search.
How to read the results
The minimum degree is the lowest degree with a guaranteed bound no larger than your tolerance. The terms required are one more than the degree because a degree-m Taylor polynomial has terms numbered 0 through m. The previous-degree bound is shown when it exists, so you can see the last degree that missed the tolerance.
For the supported functions, the calculator also evaluates the Taylor polynomial and the actual absolute error. This is useful because the Lagrange bound is often conservative. A bound of 0.001 means the error is guaranteed not to exceed 0.001 under the stated derivative bound; it does not mean the actual error will be close to 0.001.
What moves the degree
The distance |x - a| usually matters most. Moving the evaluation point farther from the center raises the numerator to a higher power, so more terms are needed. A larger derivative bound also raises the guaranteed error, while a smaller tolerance asks the polynomial to do more work.
What this calculator leaves out
The tool does not prove a custom derivative bound. With the custom option, it uses the entered M for the selected-degree remainder only and does not run the reverse degree search unless the zero-bound edge case makes the answer determinate. It also leaves out interval-specific derivative optimization, alternate remainder tests, complex-valued functions, and floating-point roundoff in very high-degree polynomial evaluation.
Worked example
Suppose the function is e^x, the center is a = 0, the evaluation point is x = 1, the selected degree is n = 5, and the target error is 0.001. The derivative bound is M = e.
The selected-degree bound is e / 6! = 0.00377539. The degree-5 Maclaurin polynomial gives P_5(1) = 2.71666667, so the actual error is about 0.00161516.
For the target error, degree 5 misses because its bound is above 0.001. Degree 6 qualifies because e / 7! = 0.000539342. The calculator reports minimum degree 6, terms required 7, and a guaranteed interval of about [2.717516, 2.718595] around the degree-6 approximation.
Common questions
What is the Lagrange error bound?
The Lagrange error bound is a worst-case upper bound for the Taylor remainder after a chosen degree. It uses a bound on the next derivative over the whole interval between the center and the evaluation point.
How many Taylor series terms are needed for a given accuracy?
Find the smallest degree whose remainder bound is no larger than the target error, then add one. A degree-m Taylor polynomial contains the terms for powers 0 through m, so it has m plus one terms.
Why can the guaranteed error be larger than the actual error?
The guarantee must work for every point allowed by the derivative bound, so it is intentionally conservative. The actual error depends on the specific function value and the cancellations in the Taylor polynomial.
How do I find the maximum next derivative?
Differentiate once more than the Taylor degree, take the absolute value, and bound that expression on the closed interval from a to x. For simple functions, endpoints and critical points are often enough; for harder functions, use a conservative bound.
Are sine and cosine inputs measured in radians?
Yes. Taylor series for sine and cosine use radians, and the calculator assumes radians for both the center and the evaluation point.
Does the Lagrange bound work for every Taylor series?
It applies when the needed derivatives exist and the selected derivative bound is valid on the interval being used. It does not by itself prove convergence of an arbitrary infinite series outside that setting.