Skip to main content
calculuscalculatorguide

Taylor Series Calculator: Formula, Steps, and Worked Examples

·13 min read·Solvify Team

A Taylor series calculator rewrites a function as an infinite sum of polynomial terms built from its derivatives at a single point, making a curve that's hard to evaluate directly behave like simple addition and multiplication. Every Taylor series calculator is really automating one formula — repeated differentiation at a center point, divided by increasing factorials — that you can carry out by hand for any function that's smooth enough to differentiate repeatedly. This guide covers the Taylor series formula, the special case called a Maclaurin series, four fully worked examples (eˣ, sin x, ln(1+x), and √x expanded around a nonzero center), how to estimate the remainder so you know how accurate your polynomial actually is, and the mistakes that most often derail a hand expansion.

What Is a Taylor Series Calculator and How Does It Work?

A Taylor series calculator takes a function f(x) and a center point a, then builds a polynomial approximation using the function's value and its derivatives — first, second, third, and so on — evaluated at that single point. The core idea, developed by Brook Taylor in the early 18th century, is that if you know everything about how a function is behaving right at one point (its value, its slope, its curvature, and so on), you can predict its behavior nearby with a polynomial that matches all of those properties simultaneously. Behind every Taylor series calculator sits the same formula: f(x) = f(a) + f'(a)(x-a) + f''(a)(x-a)²/2! + f'''(a)(x-a)³/3! + ..., continuing with higher derivatives divided by increasing factorials. Each added term uses one more derivative and typically makes the polynomial match the true function more closely near x = a. Students meet Taylor series calculators in calculus and differential equations courses, usually applied to the same handful of well-behaved functions — eˣ, sin x, cos x, ln(1+x) — that this guide works through by hand, along with a nonzero-center example using √x. Engineers and physicists use the same expansion to replace a complicated function with a simple polynomial approximation wherever the numbers get too messy to handle exactly.

f(x) = Σₙ₌₀^∞ f⁽ⁿ⁾(a)(x-a)ⁿ/n! — every Taylor series calculator is just this sum, truncated after however many terms you need.

What Is the Taylor Series Formula and How Is It Different From a Maclaurin Series?

The general Taylor series formula, centered at any point a, is: f(x) = Σₙ₌₀^∞ f⁽ⁿ⁾(a)(x-a)ⁿ/n! = f(a) + f'(a)(x-a) + f''(a)(x-a)²/2! + f'''(a)(x-a)³/3! + ... Here f⁽ⁿ⁾(a) means the n-th derivative of f evaluated at x = a, and n! is n factorial (0! = 1, 1! = 1, 2! = 2, 3! = 6, and so on). Each term captures a different aspect of the function's behavior at a: the 0th derivative gives the value, the 1st gives the slope, the 2nd gives the curvature, and higher derivatives refine the shape further. A Maclaurin series is simply the special case where the center is a = 0: f(x) = f(0) + f'(0)x + f''(0)x²/2! + f'''(0)x³/3! + .... Because a = 0, every (x-a) term simplifies to just x, which is why Maclaurin series formulas for eˣ, sin x, cos x, and ln(1+x) look cleaner than general Taylor series centered elsewhere. In practice, most 'famous' series you memorize — for eˣ, sin x, cos x — are Maclaurin series, while a full Taylor series calculator is needed whenever the center isn't zero, such as expanding √x around a = 4.

Maclaurin series = Taylor series centered at a = 0. Every Maclaurin series is a Taylor series, but not every Taylor series is a Maclaurin series.

How Do You Build a Taylor Polynomial Step by Step?

Building a Taylor polynomial by hand is a mechanical process once you pick a center and a degree. A Taylor series calculator runs through exactly these steps internally.

1. Step 1 — Choose the center a and the degree n

Pick the point a where you'll evaluate derivatives (a = 0 gives a Maclaurin series) and decide how many terms (degree n) you need. Higher degree generally means a more accurate approximation near a, at the cost of more differentiation.

2. Step 2 — Compute f(a), f'(a), f''(a), ... up to the n-th derivative

Differentiate f(x) repeatedly and evaluate each derivative at x = a. Keeping a running table of derivative → value at a makes it easy to spot patterns (like a repeating cycle in sin x's derivatives) before they get tedious.

3. Step 3 — Divide each derivative value by the matching factorial

The coefficient of the (x-a)ⁿ term is f⁽ⁿ⁾(a)/n!. This factorial in the denominator is what keeps higher-degree terms from blowing up — it's the same factorial that appears in binomial coefficients and combinatorics.

4. Step 4 — Assemble the polynomial

Write out the sum f(a) + f'(a)(x-a) + f''(a)(x-a)²/2! + ... through the chosen degree n. This finite sum is called the n-th degree Taylor polynomial, often written Pₙ(x).

5. Step 5 — Check the answer against a known value

Plug in a value of x close to a and compare the polynomial's output to the true function value (from a calculator or known identity). A small difference confirms the expansion was set up correctly; a large difference usually means a derivative or factorial was computed wrong.

The coefficient pattern never changes: f⁽ⁿ⁾(a)/n! for the (x-a)ⁿ term. Get the derivatives right, divide by the right factorial, and the rest is just addition.

Worked Example 1: Maclaurin Series of eˣ Through Degree 4

The function eˣ is the cleanest possible example because every derivative of eˣ is eˣ itself, so every derivative evaluated at a = 0 equals e⁰ = 1.

1. Step 1 — List the derivatives at a = 0

f(x) = eˣ, f'(x) = eˣ, f''(x) = eˣ, f'''(x) = eˣ, f⁗(x) = eˣ. At x = 0: f(0) = f'(0) = f''(0) = f'''(0) = f⁗(0) = 1.

2. Step 2 — Divide by factorials

Coefficients: 1/0! = 1, 1/1! = 1, 1/2! = 1/2, 1/3! = 1/6, 1/4! = 1/24.

3. Step 3 — Assemble the degree-4 polynomial

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

4. Step 4 — Check the answer at x = 1

True value: e¹ ≈ 2.71828. Using P₄(1) = 1 + 1 + 0.5 + 0.1667 + 0.0417 = 2.7083. The approximation is off by about 0.01, or roughly 0.4% — already close with just five terms, and the error shrinks further with each additional term since the next term, x⁵/120, is only about 0.0083 at x = 1.

eˣ Maclaurin series: 1 + x + x²/2 + x³/6 + x⁴/24 + ... — every coefficient is 1/n! because every derivative of eˣ equals eˣ.

Worked Example 2: Maclaurin Series of sin x Through Degree 5

The derivatives of sin x cycle through a repeating pattern of four functions, which makes half of the coefficients vanish automatically.

1. Step 1 — Cycle through the derivatives at a = 0

f(x) = sin x, f'(x) = cos x, f''(x) = -sin x, f'''(x) = -cos x, f⁗(x) = sin x, f⁽⁵⁾(x) = cos x. At x = 0: f(0) = 0, f'(0) = 1, f''(0) = 0, f'''(0) = -1, f⁗(0) = 0, f⁽⁵⁾(0) = 1.

2. Step 2 — Divide by factorials, keeping only nonzero terms

Every even-order derivative at 0 is 0 (since sin 0 = 0), so only odd-degree terms survive: x/1! = x, -x³/3! = -x³/6, x⁵/5! = x⁵/120.

3. Step 3 — Assemble the degree-5 polynomial

P₅(x) = x - x³/6 + x⁵/120. sin x is an odd function, so its Maclaurin series naturally contains only odd powers of x.

4. Step 4 — Check the answer at x = π/6 (30°)

True value: sin(π/6) = 0.5 exactly. With x = π/6 ≈ 0.5236: P₅(0.5236) = 0.5236 - (0.5236)³/6 + (0.5236)⁵/120 = 0.5236 - 0.02392 + 0.000328 ≈ 0.5000. The degree-5 polynomial matches the true value to four decimal places for this relatively small x.

sin x Maclaurin series: x - x³/6 + x⁵/120 - ... — only odd powers appear, and alternating signs come directly from the -sin x and -cos x derivatives in the cycle.

Worked Example 3: Maclaurin Series of ln(1+x) at x = 0.2, With Error Discussion

The function ln(1+x) is undefined at x = -1 and its series only converges for -1 < x ≤ 1, which makes it a good example for discussing how far you can trust a truncated polynomial.

1. Step 1 — List the derivatives at a = 0

f(x) = ln(1+x), f'(x) = 1/(1+x), f''(x) = -1/(1+x)², f'''(x) = 2/(1+x)³, f⁗(x) = -6/(1+x)⁴. At x = 0: f(0) = 0, f'(0) = 1, f''(0) = -1, f'''(0) = 2, f⁗(0) = -6.

2. Step 2 — Divide by factorials

Coefficients: 1/1! = 1, -1/2! = -1/2, 2/3! = 1/3, -6/4! = -1/4. This produces the well-known pattern ln(1+x) = x - x²/2 + x³/3 - x⁴/4 + ..., where the n-th coefficient is (-1)ⁿ⁺¹/n.

3. Step 3 — Evaluate at x = 0.2 through degree 4

P₄(0.2) = 0.2 - (0.2)²/2 + (0.2)³/3 - (0.2)⁴/4 = 0.2 - 0.02 + 0.002667 - 0.0004 = 0.182267.

4. Step 4 — Check against the true value and discuss the error

True value: ln(1.2) ≈ 0.182322. The degree-4 approximation is off by about 0.000055, or roughly 0.03% — very small because x = 0.2 is close to the center a = 0. If you instead tried x = 0.9 (much closer to the boundary of convergence at x = 1), the same degree-4 polynomial would be noticeably less accurate, since the remainder grows quickly as x approaches the edge of where the series converges. This is why checking how far x is from the center matters as much as checking how many terms you used.

ln(1+x) Maclaurin series: x - x²/2 + x³/3 - x⁴/4 + ... — accurate to four decimal places at x = 0.2, but the same degree-4 polynomial loses accuracy fast as x approaches the boundary of convergence at x = 1.

Worked Example 4: Taylor Series of √x Around a Nonzero Center, a = 4

√x isn't defined by a simple derivative pattern the way eˣ or sin x are, and it can't be expanded around a = 0 at all (its derivatives blow up there), which makes it the right example for a nonzero-center Taylor series.

1. Step 1 — List the derivatives at a = 4

f(x) = √x = x^(1/2), f'(x) = (1/2)x^(-1/2), f''(x) = -(1/4)x^(-3/2), f'''(x) = (3/8)x^(-5/2). At x = 4: f(4) = 2, f'(4) = (1/2)(1/2) = 1/4, f''(4) = -(1/4)(1/8) = -1/32, f'''(4) = (3/8)(1/32) = 3/256.

2. Step 2 — Divide by factorials

Coefficients: 2/0! = 2, (1/4)/1! = 1/4, (-1/32)/2! = -1/64, (3/256)/3! = 1/512.

3. Step 3 — Assemble the degree-3 Taylor polynomial centered at a = 4

P₃(x) = 2 + (1/4)(x-4) - (1/64)(x-4)² + (1/512)(x-4)³. Every term uses (x-4), not x, because the center is a = 4.

4. Step 4 — Check the answer at x = 4.5

True value: √4.5 ≈ 2.12132. With (x-4) = 0.5: P₃(4.5) = 2 + (1/4)(0.5) - (1/64)(0.25) + (1/512)(0.125) = 2 + 0.125 - 0.003906 + 0.000244 ≈ 2.12134. This is within 0.00002 of the true value, since x = 4.5 is close to the center a = 4 — the same closeness rule that made the ln(1+x) example accurate at x = 0.2.

√x Taylor series at a = 4: 2 + (x-4)/4 - (x-4)²/64 + (x-4)³/512 - ... — centering at a = 4 avoids the undefined derivatives that √x has at a = 0.

How Do You Estimate the Remainder to Know How Accurate a Taylor Polynomial Is?

A Taylor polynomial of degree n is only an approximation, and the gap between it and the true function is called the remainder, Rₙ(x). The Lagrange form of the remainder gives a concrete way to bound it: Rₙ(x) = f⁽ⁿ⁺¹⁾(c)(x-a)ⁿ⁺¹/(n+1)! for some c between a and x. You usually don't know c exactly, but you can bound f⁽ⁿ⁺¹⁾(c) by its maximum possible size on the interval between a and x, which gives an upper bound on the error even without knowing c precisely. For the eˣ example, since eˣ and all its derivatives are increasing and bounded by e¹ ≈ 2.71828 on [0,1], the remainder after the degree-4 term is at most e¹ · 1⁵/5! ≈ 2.71828/120 ≈ 0.02265 — consistent with the 0.01 error actually observed, since the bound is an upper limit, not an exact value. For an alternating series like sin x's or ln(1+x)'s Maclaurin series, there's a simpler shortcut: the error is no larger than the absolute value of the first omitted term. In the ln(1+x) example at x = 0.2, the first omitted term after degree 4 is x⁵/5 = (0.2)⁵/5 = 0.0000064, which matches the tiny actual error of about 0.000055 in that worked example (the alternating bound is a safe upper estimate, not always an exact match).

Alternating series remainder shortcut: the error from truncating is never larger than the size of the first term you left out — no derivative bound needed.

What Mistakes Break a Hand-Computed Taylor Series?

A few recurring errors account for most incorrect Taylor series calculations.

1. Forgetting to divide by the factorial

Writing the coefficient of (x-a)ⁿ as f⁽ⁿ⁾(a) instead of f⁽ⁿ⁾(a)/n! is the single most common mistake — it makes every term after the linear one far too large. Double-check that n! grows for each successive term (1, 1, 2, 6, 24, 120, ...).

2. Using x instead of (x-a) for a nonzero center

As shown in the √x example above, when a ≠ 0, every term must use (x-a), not x. Writing x⁴/4 instead of (x-4)⁴/4! for an expansion centered at a = 4 produces a polynomial that doesn't actually approximate the function near x = 4.

3. Losing track of the derivative cycle

Functions like sin x and cos x cycle through four derivatives (sin, cos, -sin, -cos) before repeating. Miscounting where you are in the cycle — especially past the third or fourth derivative — is an easy way to flip a sign or use the wrong function.

4. Trusting the polynomial too far from the center

A Taylor polynomial is most accurate near its center a and gets progressively less reliable as x moves away, as shown by the ln(1+x) discussion above. Always sanity-check with the remainder estimate, or at minimum ask whether x is 'close' to a, before trusting a truncated series for a specific numeric answer.

The fastest sanity check on any Taylor polynomial: does it match a known value of the function at some easy point, or does the remainder bound explain the size of the gap? A large, unexplained mismatch usually means a factorial or sign error.

Taylor Series Calculator Practice Problems and FAQ

Try these on your own, then check the answers below. 1) Find the degree-3 Maclaurin polynomial for cos x. 2) Find the degree-2 Taylor polynomial for ln x centered at a = 1. 3) Estimate the remainder if you truncate the eˣ Maclaurin series after the x² term, evaluated at x = 1. Answers: 1) f(0)=1, f'(0)=0, f''(0)=-1, f'''(0)=0, giving P₃(x) = 1 - x²/2 (the x and x³ terms vanish since cos x is even). 2) At a = 1: f(1)=0, f'(1)=1, f''(1)=-1, giving P₂(x) = (x-1) - (x-1)²/2. 3) The remainder bound is e¹ · 1³/3! ≈ 2.71828/6 ≈ 0.4531 — a loose bound, since only two terms were kept, showing why more terms are needed for tight accuracy near x = 1. A Taylor series calculator is genuinely useful for checking these by hand, especially for catching a factorial or sign error across several derivative terms, but the underlying formula — f(a), f'(a), f''(a), divided by matching factorials — is what actually lets you set the problem up correctly in the first place. If you want every derivative and factorial step shown explicitly rather than just a final polynomial, Solvify's step-by-step solver walks through each Taylor series calculation the same way this guide does, term by term.

1. Is a Taylor series calculator the same as a Maclaurin series calculator?

A Maclaurin series calculator is just a Taylor series calculator with the center fixed at a = 0. Any tool that computes a general Taylor series can produce a Maclaurin series by setting a = 0, but a dedicated Maclaurin-only tool won't handle a nonzero center like the √x example above.

2. How many terms should a Taylor polynomial include?

It depends on how far x is from the center a and how much accuracy you need. Close to the center, even 3-4 terms can match the true value to several decimal places, as shown in the ln(1+x) and √x examples; far from the center, many more terms — or a different center altogether — may be needed, and the remainder estimate is the reliable way to check.

The recipe never changes: differentiate repeatedly at the center, divide by the matching factorial, then add up the terms. Everything else — Maclaurin as a special case, remainder bounds, convergence near the center — builds on that same base.
Tags:
calculuscalculatorguide

Get Homework Help Now

Join millions of students using our AI math solver for homework help. Get instant solutions to math problems, step-by-step explanations, and 24/7 homework assistance.

Available for iOS and Android devices