Taylor Series Calculator
Expand a function f(x) into its Taylor (or Maclaurin) polynomial about any center a, to a chosen degree, with every derivative used to build each coefficient and an optional evaluation at a point against the actual function value.
Input
a = 0 gives the Maclaurin series.
Optional — compares the polynomial approximation to the actual f(x₀). Leave blank for the symbolic result only.
Output
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/taylor-series-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"f": "sin(x)",
"a": "0",
"n": "5",
"x0": "1"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `taylor-series-calculator` tool (Taylor Series Calculator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/taylor-series-calculator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Taylor Series Calculator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
The Taylor Series Calculator expands a function f(x) into its Taylor polynomial about any center a, to a degree you choose (1st through 10th). It shows every derivative used to build each coefficient, the resulting polynomial, and — if you give it a point x₀ — how closely the polynomial approximates the actual f(x₀).
It's built for calculus students checking a Taylor or Maclaurin series homework problem, and for anyone who wants to see why a series approximation works: each term comes directly from a derivative evaluated at the center, divided by a factorial, with nothing hidden.
How to use it
- Enter your function f(x) — standard math notation works:
^for powers,*for multiplication, plussqrt(),sin(),cos(),exp(),log(), and the other functions supported by mathjs's expression parser. - Enter the center a — leave it at
0for the Maclaurin series (a Taylor series centered at the origin). - Choose the degree — how many terms of the expansion to compute.
- Optionally enter a point x₀ to compare the polynomial's approximation against the actual value of f there.
- Read Taylor Polynomial for the expansion and Step-by-Step Derivation for every derivative and coefficient that built it.
Results update automatically as you type. For example, f = sin(x) about a = 0 to degree 5 gives P(x) = x - 0.166667x³ + 0.00833333x⁵ — which at x = 1 approximates 0.841667, against sin(1)'s actual 0.841471.
How is each coefficient computed?
The degree-n Taylor polynomial of f(x) about a center a is:
P(x) = f(a) + f′(a)(x - a) + f″(a)/2!·(x - a)² + ... + f⁽ⁿ⁾(a)/n!·(x - a)ⁿEach coefficient is the k-th derivative of f, evaluated at the center a, divided by k!. This calculator differentiates f symbolically k times in a row — each derivative computed from the previous one — evaluates each result at a, and divides by the running factorial, so every coefficient in the output traces back to an explicit derivative you can check by hand.
Why doesn't the approximation match exactly?
A Taylor polynomial is only exact at the center itself (x = a); everywhere else it's an approximation whose accuracy improves as the degree increases and gets worse the farther x₀ is from a. The |Error| value is exactly that gap — |actual f(x₀) − P(x₀)| — so you can see the trade-off directly: raise the degree slider for a tighter fit, or move x₀ closer to a.
What functions can I enter?
Anything mathjs's expression evaluator understands and can differentiate: polynomials (x^3 - 2*x), trigonometric functions (sin(x), cos(x), tan(x)), exponentials and logarithms (exp(x), log(x)), roots (sqrt(x)), and combinations of these, using x as the variable. Angles in trig functions are in radians by default — write pi for π.
Need an implicit function's derivative instead of an explicit one's series? See the Implicit Derivative Calculator. For a multivariable function's gradient or directional derivative, see the Directional Derivative Calculator.
Privacy
This calculator runs entirely in your browser. Your function, center, degree, and point are never uploaded, logged, or stored — the computation happens locally on your device.