Taylor Series Calculator
Expand any function into a Taylor polynomial around a chosen center point — see every coefficient and how accurate the approximation is.
How to Use the Taylor Series Calculator
- 1Enter a function of x, such as sin(x), e^x, or ln(1+x), or click one of the preset buttons.
- 2Enter the center point a — use 0 for a Maclaurin series, or any other point to expand around.
- 3Choose the order (0 to 10) — higher orders include more terms and are generally more accurate near the center.
- 4Optionally enter a value of x to compare the Taylor polynomial's estimate against the function's true value.
- 5Click Compute Taylor Series to see the polynomial, each coefficient, and the approximation error.
- •A Maclaurin series is simply a Taylor series centered at a = 0.
- •Derivatives are computed numerically, so results are most accurate for orders up to about 8.
About the Taylor Series Calculator
A Taylor series represents a function as an infinite sum of terms built from the function's derivatives at a single point. In practice, we truncate the series after a finite number of terms to get a Taylor polynomial — a polynomial that closely approximates the original function near the center point.
This calculator computes the Taylor polynomial for any function you enter, up to the order you choose, by numerically evaluating the function's derivatives at the center point. It's useful for calculus coursework, understanding how functions like sin(x) and eˣ are approximated in computing, and checking your own by-hand Taylor series work.
The Taylor Series Formula
The Taylor series of a function f(x) centered at x = a is:
f(x) ≈ f(a) + f′(a)(x−a) + f″(a)/2!·(x−a)² + f‴(a)/3!·(x−a)³ + … + f⁽ⁿ⁾(a)/n!·(x−a)ⁿ
Each coefficient is the nth derivative of f evaluated at a, divided by n factorial. This calculator computes each derivative using a centered finite-difference approximation (rather than symbolic differentiation), which works for any function you can type — not just a fixed list of presets — though accuracy gradually decreases at very high orders due to floating-point rounding.
Worked Example: sin(x) at a = 0, order 5
- f(0) = 0, f′(0) = 1, f″(0) = 0, f‴(0) = −1, f⁗(0) = 0, f⁽⁵⁾(0) = 1
- Dividing by factorials: coefficients are 0, 1, 0, −1/6, 0, 1/120
P(x) = x − x³/6 + x⁵/120 (the classic 5th-order Maclaurin expansion of sin x)
Common Maclaurin Series (Taylor Series at a = 0)
Well-Known Maclaurin Series
| Function | Series Expansion |
|---|---|
| sin(x) | x − x³/3! + x⁵/5! − x⁷/7! + … |
| cos(x) | 1 − x²/2! + x⁴/4! − x⁶/6! + … |
| eˣ | 1 + x + x²/2! + x³/3! + x⁴/4! + … |
| ln(1+x) | x − x²/2 + x³/3 − x⁴/4 + … (|x| < 1) |
| 1/(1−x) | 1 + x + x² + x³ + x⁴ + … (|x| < 1) |
These are standard results from calculus references; enter any of them (or a custom function) into the calculator above to see the numerically computed coefficients match.
Taylor Series vs. Maclaurin Series
A Maclaurin series is just a special case of a Taylor series where the center point a = 0. The general Taylor series lets you expand a function around any point — useful when you want a good local approximation somewhere other than zero, for example approximating √x near x = 4 rather than near x = 0 (where the function and its derivatives aren't even defined).
Set the center point field to 0 in this calculator to get a Maclaurin series, or any other value to get a general Taylor series around that point.
Why Truncate a Taylor Series?
An exact Taylor series has infinitely many terms, but in practice we only need a handful of terms — a Taylor polynomial — to approximate a function accurately near the center point. This is exactly how calculators and computers historically computed values of sin, cos, log, and other transcendental functions: with a truncated polynomial that's fast to evaluate.
The trade-off is accuracy versus distance from the center: a low-order polynomial is very accurate right at (and near) the center point, but the error grows as x moves further away. Higher orders extend the accurate range, which is exactly what the approximation error shown by this calculator demonstrates.
Who Uses This Calculator?
- ✓Calculus students checking Taylor and Maclaurin series homework
- ✓Engineering and physics students who need a quick polynomial approximation of a function
- ✓Anyone studying how computers and calculators approximate transcendental functions
- ✓Instructors building worked examples for a calculus course
Limitations & Notes
Known Limitations
- •Derivatives are computed numerically (via finite differences), not symbolically, so coefficients may show tiny rounding error, especially at higher orders.
- •Order is capped at 10 to keep numerical differentiation stable and accurate.
- •Functions must be differentiable at the chosen center point — expanding ln(x) at a = 0, for example, will fail since ln is undefined there.
Tips
- →Use a center point where the function and several of its derivatives are clearly defined and smooth.
- →Check the approximation error at a test point close to the center — it should shrink as you increase the order.
- →For functions with restricted domains (like ln(1+x), valid for x > −1), keep your test point inside that domain.
Frequently Asked Questions
- What is a Taylor series used for?
- A Taylor series approximates a function as a polynomial built from its derivatives at a single point. It's used throughout calculus, physics, and engineering to simplify complicated functions, estimate values of transcendental functions like sin, cos, and eˣ, and analyze the behavior of functions near a point.
- What is the difference between a Taylor series and a Maclaurin series?
- A Maclaurin series is a Taylor series centered specifically at x = 0. Every Maclaurin series is a Taylor series, but a Taylor series can be centered at any point a, not just zero.
- How many terms should I use in a Taylor polynomial?
- It depends on how far your point of interest is from the center and how much accuracy you need. More terms (higher order) generally improve accuracy, especially further from the center, but for points very close to the center, even a low order (2–4) is often sufficient.
- Why is my Taylor series coefficient not exactly 0 when it should be?
- Because this calculator computes derivatives numerically rather than symbolically, coefficients that are mathematically exactly zero (like the even-order terms of sin(x)) may show as a very small number (e.g. 0.0000001) due to floating-point rounding rather than being displayed as a perfect 0.
- Can I expand a function around a point other than 0?
- Yes — enter any value in the "center point (a)" field. The calculator will expand the function around that point instead of at zero, producing a general Taylor series rather than a Maclaurin series.
Looking for more calculator tools? Browse all Calculator Tools
More Calculators
Inverse Function Calculator
Solve f(x) = y for x with this free inverse function calculator. Enter any function and target value to numerically find the inverse.
Scientific Calculator
Free online scientific calculator with trigonometry, logarithms, exponents, and memory functions. Evaluate complex mathematical expressions instantly.
Mixed Fraction Calculator
Add, subtract, multiply, or divide mixed numbers instantly. Free mixed fraction calculator with simplified results, improper fractions, and decimals.
Percentage Calculator
Calculate percentages, percentage change, and what percent one number is of another. Free online percentage calculator for everyday math.
You Might Also Like
Fraction Calculator
Add, subtract, multiply, and divide fractions online free. Simplify fractions and convert between fractions and decimals instantly.
Binary Calculator
Add, subtract, multiply, and divide binary numbers online free. Shows step-by-step working and decimal equivalents for every operation. No signup needed.
Unit Converter
Convert length, weight, temperature, area, volume, and speed units online free. Metric and imperial unit conversion with instant results.