# Taylor & Maclaurin Series Calculator

Compute Taylor and Maclaurin polynomial series approximations with clear step-by-step error analysis and instant results.

---

- **Canonical URL:** https://dothecalculation.com/calculators/taylor-series-calculator
- **Category:** Math calculators
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Taylor & Maclaurin Series Solver

Compute Taylor and Maclaurin polynomial approximations for eˣ, sin(x), cos(x), and ln(1+x), with absolute and relative error shown against the exact value.

- Custom approximation centers (a)
- Adjustable polynomial degree (n, 1–8)
- Visual convergence mapping vs. the exact function

## Introduction to Taylor and Maclaurin Series Approximations

In calculus, a Taylor series is an infinite sum of terms expressed in terms of a function's derivatives at a single point. If the series is centered at zero, it is called a Maclaurin series. These series matter because they let us approximate non-polynomial functions (like sine, cosine, and exponential functions) using simple polynomial terms, which are easy to compute, differentiate, and integrate.

An approximation using the first few terms of a Taylor series is called a Taylor polynomial. Its accuracy depends on two factors: the degree of the polynomial (the number of terms included) and the distance between the evaluation point \(x\) and the center point \(a\). As the degree increases, the approximation generally converges toward the true value of the function within its interval of convergence.

This calculator computes Taylor and Maclaurin polynomial approximations for four functions: \(e^x\), \(\sin(x)\), \(\cos(x)\), and \(\ln(1+x)\). Enter the center \(a\), the polynomial degree \(n\) (1–8), and the target evaluation point \(x\), and it shows the term-by-term derivative expansion, the polynomial's approximate value, and the absolute and relative error against the true function value.

## Mathematical Formulation of Taylor Series

The Taylor series of a function \(f(x)\) that is infinitely differentiable at a point \(a\) is the power series: $$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n$$

Where \(f^{(n)}(a)\) denotes the \(n\)-th derivative of \(f\) evaluated at \(a\), and \(n!\) is the factorial of \(n\). The zeroth derivative \(f^{(0)}(a)\) is defined as \(f(a)\), and \((x-a)^0 = 1\).

For a Maclaurin series, the center \(a\) is set to 0: $$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} x^n$$

This calculator evaluates the polynomial approximation up to degree \(n\), then compares it directly against the true function value at \(x\) to report the absolute and relative error.

## Worked Case Study: Estimating eˣ Using Maclaurin Polynomials

Calculate the Maclaurin approximation for \(f(x) = e^x\) of degree \(n = 3\), evaluated at \(x = 1\) (the calculator's defaults). The center is \(a = 0\).

All derivatives of \(e^x\) equal \(e^x\) itself, so \(f^{(k)}(0) = e^0 = 1\) for every \(k\). The 3rd-degree Maclaurin polynomial is: $$P_3(x) = 1 + x + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 = 1 + x + \frac{x^2}{2} + \frac{x^3}{6}$$

Substituting \(x = 1\): $$P_3(1) = 1 + 1 + \frac{1}{2} + \frac{1}{6} = 2.6667$$

The exact value of \(e^1\) is approximately 2.7183. The absolute error is \(|2.7183 - 2.6667| = 0.0516\) (about 1.9%) — matching what the calculator returns for its default inputs. Increasing the degree rapidly shrinks this error.

## How to Use This Calculator

Choose a function (\(e^x\), \(\sin x\), \(\cos x\), or \(\ln(1+x)\)), set the center \(a\) and the polynomial degree \(n\) (1–8), and enter the evaluation point \(x\). The calculator expands the Taylor polynomial term by term and compares it to the exact function value, plotting both curves.

## Related Calculators

To verify the factorial terms in the denominator of each Taylor term, use the [factorial and gamma function calculator](/calculators/factorial-gamma-calculator). For evaluating the exact transcendental function value directly, see the [scientific calculator](/calculators/scientific-calculator).

## Convergence, and the Theoretical Lagrange Error Bound

A key aspect of Taylor series is where they converge. For \(e^x\), \(\sin x\), and \(\cos x\), the series converges for all real \(x\). For \(\ln(1+x)\), it only converges within a restricted interval, \(-1 < x \leq 1\); evaluating outside that interval produces terms that don't match the function's actual value (which this calculator guards against by clamping inputs above -1).

Taylor's theorem separately defines the Lagrange form of the remainder, a theoretical bound on the maximum possible error over an interval: $$R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!} (x - a)^{n+1}$$ where \(c\) is some number between \(a\) and \(x\). This calculator does not compute \(R_n(x)\) — it reports the actual absolute and relative error by directly comparing the polynomial approximation to the true function value, which is a more concrete (and for these four functions, more informative) number than the theoretical worst-case bound.

## Frequently asked questions

### What is a Taylor series?

A Taylor series is an infinite sum of terms representing a function as a polynomial, calculated using the function's derivatives at a single point (the center).

### What is the difference between a Taylor and a Maclaurin series?

A Taylor series can be centered at any point a. A Maclaurin series is a Taylor series centered specifically at a = 0.

### Which functions can this calculator expand?

Four: eˣ, sin(x), cos(x), and ln(1+x), at a degree from 1 to 8. Other functions aren't supported.

### Does this calculator compute the Lagrange error bound R_n(x)?

No — it reports the actual absolute and relative error by comparing the Taylor polynomial's value directly to the true function value. The Lagrange remainder formula is a separate theoretical worst-case bound, shown above for reference, that this calculator doesn't compute.

### What is a Taylor polynomial?

A truncated (finite) version of the infinite Taylor series, representing the approximation up to a specific degree n.

### What does convergence mean for a Taylor series?

As the number of terms increases, the sum of the series approaches the exact value of the function. The set of x-values where this happens is the interval of convergence.

### Can any function be represented by a Taylor series?

No, only functions that are infinitely differentiable in a neighborhood around the center point — called analytic functions.

### What happens if you evaluate ln(1+x) near or below x = -1?

The series diverges since ln(1+x) isn't defined there. This calculator clamps inputs to just above -1 (at -0.99) to avoid an undefined result.

### How many terms are needed for a good Taylor series approximation?

It depends on the function, the distance from the center point, and the desired accuracy. Points evaluated close to the center converge with fewer terms.

### What is the Maclaurin series for eˣ?

1 + x + x²/2! + x³/3! + x⁴/4! + ..., which converges for all real numbers x.

### What is the Maclaurin series for sin(x)?

Only odd powers: x - x³/3! + x⁵/5! - x⁷/7! + ..., which converges for all real numbers x.

### What is the Maclaurin series for cos(x)?

Only even powers: 1 - x²/2! + x⁴/4! - x⁶/6! + ..., which converges for all real numbers x.

## Related concepts

- **Lagrange Error Bound** — The theoretical maximum-error formula from Taylor's theorem — reference material, not computed by this tool.
- **Interval of Convergence** — The set of real numbers for which a power series converges to a finite value.
- **Analytic Function** — A function that can be locally represented by a convergent power series, such as its Taylor series.

## Related guides

- [Scientific Notation Guide: Powers of Ten Made Practical](https://dothecalculation.com/blog/math/scientific-notation-basics) — Learn how to convert, compare, and calculate with powers of ten using worked examples and the live DTC scientific calculator.

## Related calculators

- [Derivative & Limit Solver](https://dothecalculation.com/calculators/derivative-solver) — Compute first and second derivatives of algebraic functions, find limits, and solve tangent line equations with clear steps.
- [Laplace & Inverse Laplace Transform Solver](https://dothecalculation.com/calculators/laplace-transform-calculator) — Compute Laplace transforms for time-domain functions and inverse Laplace transforms with clear step-by-step solutions shown.
- [Exponent Calculator](https://dothecalculation.com/calculators/exponent-calculator) — Solve exponent equations, simplify fractional powers into radicals, and compute large scientific notations with this free calculator.
- [Fourier Series Coefficient Synthesizer](https://dothecalculation.com/calculators/fourier-series-calculator) — Decompose periodic waveforms like square, triangle, and sawtooth into sine and cosine Fourier series coefficients instantly.
- [Definite & Indefinite Integral Solver](https://dothecalculation.com/calculators/integral-solver) — Evaluate indefinite antiderivatives, definite integrals, and Riemann sum approximations instantly with this free calculus solver.
- [Logarithm Calculator](https://dothecalculation.com/calculators/log-calculator) — Calculate logarithms for any custom base, common log base 10, and natural log ln with clear step-by-step rules and instant results.

---

_This mathematical solver is designed for academic, engineering, and educational analysis. Rounding errors, numerical tolerances, or algorithm constraints might apply near poles, boundary conditions, or complex coordinate spaces. Always verify critical computations independently._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/taylor-series-calculator). Quote freely with attribution and a link to this page._
