Math Calculator

Taylor and Maclaurin Series Calculator

Calculate Taylor and Maclaurin polynomials with derivative coefficients, approximation error and a function-vs-polynomial graph.

Build a Taylor polynomial about any numeric center or a Maclaurin polynomial about zero, inspect every coefficient, evaluate the approximation at a test point, and compare it with the original function.

Supported input: x, numbers, pi, e, + − × ÷, powers, parentheses, exp, ln/log, sin, cos, tan, sqrt and atan/arctan. Trigonometric inputs use radians. The calculator builds a finite Taylor polynomial; a finite polynomial alone does not prove convergence of the infinite Taylor series.
Examples: e^x, sin(x), ln(x), ln(1+x), 1/(1-x), sqrt(1+x), x^2*exp(x)
a = 0 gives a Maclaurin polynomial.
Plots from a − width to a + width.

Use this Taylor and Maclaurin series calculator to expand a supported function into a finite polynomial about any numeric center. Enter the function, choose the center and order, and optionally evaluate the approximation at another x-value. The calculator shows the Taylor or Maclaurin polynomial, every derivative value and coefficient, the approximation error at your test point, and a graph comparing the polynomial with the original function.

How the Taylor polynomial is built

For a function f with enough derivatives at x = a, the nth Taylor polynomial is:

Pn(x) = Σ[k=0…n] f(k)(a) / k! × (x − a)k

OpenStax gives the same coefficient rule: each power of (x − a) uses the kth derivative evaluated at the center divided by k!. When the center is zero, the expansion is called a Maclaurin polynomial.

Taylor series calculator versus Maclaurin series calculator

A Taylor series calculator allows any valid expansion center a. A Maclaurin series calculator is the special case a = 0. The underlying calculation is the same; only the center changes.

For example, the fifth-order Maclaurin polynomial of sin(x) is:

x − x³/6 + x⁵/120

But the Taylor polynomial of ln(x) about a = 1 is naturally written in powers of (x − 1), such as (x − 1) − (x − 1)²/2 + (x − 1)³/3 for order 3.

What this calculator supports

The expression engine supports arithmetic combinations of x, numbers, pi and e together with exp, natural log, sine, cosine, tangent, square root and inverse tangent. Products, quotients and powers are expanded directly as truncated power series, which lets the tool handle inputs such as x²eˣ, cos(x)/(1−x) and sqrt(1+x) without relying on a fixed list of four functions.

The maximum order is 10. This is deliberate: it keeps the coefficients, graph and step table readable while still covering the order range commonly used in calculus exercises.

Approximation value and actual error

If you enter a test point, the calculator evaluates both the finite Taylor polynomial and the original function there. It then reports:

  • Pn(x), the polynomial approximation;
  • f(x), the direct function value;
  • absolute error |f(x) − Pn(x)|; and
  • relative error when f(x) is not zero.

The approximation is usually strongest near the expansion center. Increasing the order often improves a local approximation, but a finite polynomial does not by itself prove that the infinite Taylor series converges to the original function at every x.

Common Maclaurin series

Function Maclaurin series Typical convergence
ex 1 + x + x²/2! + x³/3! + … All real x
sin(x) x − x³/3! + x⁵/5! − … All real x
cos(x) 1 − x²/2! + x⁴/4! − … All real x
1/(1−x) 1 + x + x² + x³ + … |x| < 1
ln(1+x) x − x²/2 + x³/3 − … −1 < x ≤ 1
arctan(x) x − x³/3 + x⁵/5 − … |x| ≤ 1, with endpoint conditions

Worked Maclaurin example: e^x

Every derivative of ex is ex, and every derivative value at zero is 1. Therefore the degree-4 Maclaurin polynomial is:

P₄(x) = 1 + x + x²/2 + x³/6 + x⁴/24

At x = 1, P₄(1) = 2.708333…, while e ≈ 2.7182818, so the absolute error is about 0.0099485.

Worked Taylor example: ln(x) about 1

For f(x) = ln(x), expanding around a = 1 avoids the singularity at zero. The first derivatives at 1 alternate in sign and produce:

P₃(x) = (x−1) − (x−1)²/2 + (x−1)³/3

This is a true Taylor expansion because the center is 1 rather than zero.

Frequently asked questions

What is the difference between Taylor and Maclaurin series?

A Maclaurin series is simply a Taylor series centered at a = 0. Any nonzero center is usually described as a Taylor expansion.

Does this Taylor series calculator show steps?

Yes. The coefficient table lists k, f(k)(a), k! and f(k)(a)/k!, which are the values used to build each polynomial term.

Can the calculator expand e^x?

Yes. You can enter e^x or exp(x). The parser also supports products such as x^2*e^x.

Why can a Taylor polynomial be accurate near the center but poor far away?

Its coefficients are chosen to match the function’s derivatives at one center. Accuracy away from that point depends on the function, order and convergence behavior of the underlying infinite series.

Does the calculator prove convergence?

No. It calculates finite Taylor polynomials and actual pointwise error where requested. A proof that an infinite Taylor series converges to f requires additional remainder or convergence analysis.

Methodology and sources

The coefficient definition, Taylor/Maclaurin distinction and remainder concepts follow OpenStax Calculus Volume 2, Section 6.3. Current first-page Taylor and Maclaurin calculators were reviewed for useful features including free-form function entry, derivative/coefficient tables, test-point error and graph comparison. The calculator performs its expansion locally in the browser and does not send expressions to an external symbolic service.