Taylor Polynomials Calculator
A Taylor polynomial replaces a complicated function with a short polynomial built from the function’s derivatives at a single point, and this calculator does the arithmetic for you. Pick a preset function or type your own f(x), set the center and the degree, and you get the polynomial form, the approximation at your chosen x, the true value, and the error, all in one view. To evaluate a polynomial you have written out by hand, the polynomial calculator runs the arithmetic directly.
Honest quirks of this tool: for sin(x) and cos(x) the degree field counts term rounds (n = 4 adds terms through x⁸/9! and x⁸/8!), not the literal highest power. The ln(1+x) option always expands at 0 and ignores the expansion-point field. The Polynomial Form label always shows the Maclaurin shape; the numbers still use (x − a) when a is not 0. Blank fields produce NaN, not an error message. Custom f(x) is parsed safely in the browser (no code is executed) and differentiated exactly from its formula, so its coefficients are exact rather than finite-difference estimates.
Quick Answer
With e^x, center a = 0, degree 4, evaluated at x = 1, the calculator returns Approximation P(1) = 2.70833333 against the true value 2.71828183, an absolute error of 0.0099484951 (0.365985%). That is the degree-4 Maclaurin polynomial 1 + x + x²/2 + x³/6 + x⁴/24 evaluated at x = 1. Change the function, center or degree above and the same five-line readout updates. Type x^3 + 2x as a custom function with center 0 and degree 3 and the tool returns the exact polynomial 2(x) + 1(x)^3: at x = 2 both the approximation and the true value are 12, with zero error.
Key takeaways
- A Taylor polynomial of degree n is the sum f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + … + fⁿ(a)(x − a)ⁿ/n!, and setting a = 0 makes it a Maclaurin polynomial.
- This tool ships four built-in functions, sin(x), cos(x), e^x and ln(1+x), and always shows the approximation, the true value, and both errors side by side.
- For sin and cos, the degree field counts rounds of terms rather than the literal highest power; the ln(1+x) option always expands at 0. Both quirks are labeled on the calculator.
- Approximations are local: the error shrinks fast near the center and grows as x moves away, which is why the evaluate-at point matters as much as the degree.
- Quick Answer
- How to use the Taylor polynomials calculator
- The four built-in series, exactly as the tool computes them
- Custom f(x): type any function
- Worked example: estimating e with four terms
- Why approximations are local: the center matters more than the degree
- What competing calculators do differently
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the Taylor polynomials calculator
Four inputs, one click, five readouts. The results stay hidden until you calculate.
- Choose the function: sin(x), cos(x), e^x or ln(1+x) from the dropdown. The calculator is pre-set to e^x.
- Set the point of expansion (a): the center of the approximation, pre-filled as 0. Derivatives are evaluated here, so the polynomial hugs the function best near this point.
- Set the degree (n): how many rounds of the series to add, from 1 to 10, pre-filled as 4.
- Set the evaluate-at point (x): where the approximation and the true value are compared, pre-filled as 1.
- Click Calculate: the readout shows the polynomial form, the approximation, the actual value, the absolute error and the relative error.
The approximation column uses eight decimals, the error column ten, and the relative error six, so you can watch convergence as you raise the degree. Copy my results and Share results sit side by side in the results box for saving or sending a run.
The four built-in series, exactly as the tool computes them
Each preset is the standard Taylor series of its function, summed term by term with factorials in the denominators. The formulas below match the code line for line, so there is no gap between what the page teaches and what the tool does.
cos(x) about a: Σ (−1)⁰ (x − a)²⁰ / (2i)! for i = 0 … n
e^x about a: Σ (x − a)⁰ / i! for i = 0 … n
ln(1+x) about 0 only: Σ (−1)⁰⁻¹ x⁰ / i for i = 1 … n
Two details deserve honesty rather than fine print. First, the sin and cos loops run i from 0 to n, so with n = 4 the sin sum reaches x⁸/9! and the cos sum reaches x⁸/8!: the field behaves like a term-round counter for the trigonometric pair, not a strict highest-power degree. Second, the ln branch sums x⁰/i with no (x − a) anywhere, which means the expansion-point field has no effect on ln(1+x); it always expands at 0. These are preserved behaviors of the tool, not mistakes in your reading of it.
Custom f(x): type any function
Choose Custom f(x) in the dropdown and type any function of x. The tool accepts numbers, x, pi, e, addition, subtraction, multiplication, division, powers, parentheses, and the functions sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, exp, ln, log, sqrt and abs. The expression is parsed safely in your browser: no code is executed, so a typed function can never run anything. Its derivatives are then computed exactly from the formula, not estimated by finite differences, which is what keeps high-degree coefficients accurate.
Two custom runs, checked against this exact tool. First, x^3 + 2x with center 0 and degree 3 gives P(x) = 2(x) + 1(x)^3; at x = 2 the approximation and the true value are both 12, with zero error, because a degree-3 polynomial is its own Taylor polynomial. Second, 1/(1-x) with center 0 and degree 4 gives P(x) = 1 + 1(x) + 1(x)^2 + 1(x)^3 + 1(x)^4; at x = 0.5 the approximation is 1.9375 against the true value 2, an absolute error of 0.0625. One degree-meaning difference matters: for custom functions the degree field is the literal highest power, while the preset sin and cos options count term rounds (n = 4 reaches x^9/9! for sin). A custom sin(x) with degree 5 therefore gives 0.84166667 at x = 1, while the preset sin option with n = 5 goes further and lands on 0.84147098. Both are correct; they just stop at different terms.
If the function cannot be parsed, or a derivative is undefined at the center, or the function is undefined at the evaluation point, the tool says so in the result box instead of printing a number. Try x^2 * e^x or sqrt(1+x) next: both are one line each, and both show the same five-line readout as the presets.
Worked example: estimating e with four terms
The calculator opens pre-filled with e^x, a = 0, n = 4, x = 1. The degree-4 Maclaurin polynomial for e^x is 1 + x + x²/2 + x³/6 + x⁴/24, and at x = 1 that is 1 + 1 + 0.5 + 0.16666667 + 0.04166667 = 2.70833333.
Raise the degree and the error collapses. Every row below is a real run of this calculator at e^x, a = 0, x = 1, so you can reproduce each one:
| Degree n | Approximation P(1) | Absolute error | Relative error |
|---|---|---|---|
| 1 | 2.00000000 | 0.7182818285 | 26.424112% |
| 2 | 2.50000000 | 0.2182818285 | 8.030140% |
| 3 | 2.66666667 | 0.0516151618 | 1.898816% |
| 4 | 2.70833333 | 0.0099484951 | 0.365985% |
That is the whole story of Taylor approximation in one table: each extra term divides the error roughly by the next integer, because the factorial in the denominator outruns the power in the numerator. The same pattern holds for the other three functions at their defaults: sin(0.5) at n = 4 gives 0.47942554 against 0.47942554 (error 0.0000000000), cos(0.5) gives 0.87758256 against 0.87758256, and ln(1.5) via the x = 0.5 preset gives 0.40104167 against 0.40546511, an error of 0.0044234414. The ln error is visibly larger because its series converges slowly, a real mathematical property of the logarithmic series, not a tool defect.
Why approximations are local: the center matters more than the degree
A Taylor polynomial is a local approximation: it matches the function and its derivatives exactly at the center, then drifts as x moves away. The calculator makes this tangible. Keep sin(x) at a = 0, n = 4, and evaluate at x = 0.5: the error is zero to ten decimals. Move the center to a = 1 and evaluate at x = 1.5, the same distance from the center: the tool computes the sin series in (x − 1) and again lands on 0.47942554, now against the true sin(1.5) = 0.99749499, an error of 0.5180694480. Same polynomial, same distance from center, wildly different usefulness, because sin(1.5) is far from sin(0.5) while the series about 0 can only describe sin near 0.
This is exactly the behavior Paul's Online Notes and OpenStax describe when they emphasize choosing the center with care: the approximation is only guaranteed good near a. The practical rule is to center where you can evaluate the derivatives easily and keep x close. For the four presets here, a = 0 is the natural choice, which is why the presets default there and why the ln option hard-codes it.
What competing calculators do differently
Most Taylor tools accept an arbitrary typed function and differentiate it symbolically or numerically. That was the main gap on this page, and it is now closed: Pearson's Taylor series calculator, MiniWebTool's, and OnlineCalculatorTools' all take expressions like x^2 * e^x or 1/(1 − x), while WolframAlpha handles effectively anything. If you need an arbitrary function, this page now takes it too: choose Custom f(x) and type the same expressions, differentiated exactly from the formula you typed.
What this page wins on is candor and the error readout. Several rivals show the polynomial but leave you to judge its accuracy by eye or by graph. This calculator prints the approximation, the true value, the absolute error and the relative error on every run, so a student checking homework sees immediately whether n = 4 was enough. The degree-versus-term-count behavior and the ln-at-zero hard-coding are documented on the tool itself instead of buried, which matters because the sin/cos loop bound is the one place where a literal reading of "degree n" would mislead you. One classic use of the printed polynomial is term-by-term integration: the general antiderivative calculator integrates each term of the series you just built.
A further gap worth naming: none of the preset rivals here show a remainder bound. The Lagrange form, |Rₙ(x)| ≤ M|x − a|ⁿ⁻¹/(n+1)!, is the standard way to certify an approximation before computing it, and Calculators.sg's error-bound tool covers it. This page reports the actual error after the fact, which is more direct for checking work but does not replace the bound for planning how many terms you need.
Frequently asked questions
A Taylor polynomial is a polynomial built from a function's value and its derivatives at a single center point a: P_n(x) = f(a) + f'(a)(x - a) + f''(a)(x - a)^2/2! +... + f^(n)(a)(x - a)^n/n!. It matches the function and its first n derivatives exactly at the center, so it hugs the function closely near a and drifts as x moves away.
A Maclaurin polynomial is simply a Taylor polynomial centered at a = 0. The formula becomes P_n(x) = f(0) + f'(0)x + f''(0)x^2/2! +... + f^(n)(0)x^n/n!. Centering at zero is convenient because the derivatives of common functions are easy to evaluate there, which is why this calculator defaults the expansion point to 0 and the ln(1+x) option hard-codes it.
Five choices: the presets sin(x), cos(x), e^x and ln(1+x), plus Custom f(x), where you type any function of x. Custom input accepts numbers, x, pi, e, the four arithmetic operations, powers, parentheses, and sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, exp, ln, log, sqrt and abs. The presets are quick picks; the custom path covers everything else, with the same five-line readout.
It sets how many rounds of the series the tool adds, from 1 to 10. For e^x and ln(1+x) that is the literal highest power. For sin(x) and cos(x) the loop adds one odd or even term per round, so n = 4 reaches x^9/9! for sin and x^8/8! for cos. The calculator says this in the note under the results: for the trigonometric pair the field is a term-round counter, not a strict degree. For Custom f(x) the field is the literal highest power instead: degree 5 on sin(x) stops at x^5/5!.
Yes. The tool tokenizes what you type and builds a small formula tree; it never runs your input as code, so nothing typed can execute. Derivatives are then computed exactly from that tree with the sum, product, quotient and chain rules, which is why a degree-10 custom polynomial stays accurate where finite-difference estimates would fall apart. If the input cannot be parsed, or a derivative is undefined at the center, the tool reports that instead of a number.
Because the tool's ln code sums x^i/i with no (x - a) anywhere, so it always expands ln(1+x) at 0 regardless of what you type in the expansion-point field. This is preserved behavior from the original tool, disclosed in the results note. If you need ln expanded at another center, use a general Taylor tool and type the function yourself.
A Taylor polynomial matches the function and its derivatives exactly at the center, so the agreement is best there by construction and decays as x moves away. The error behaves roughly like |x - a|^(n+1)/(n+1)!, which is why the calculator asks for an evaluation point: keep x near a for a small error. Try sin(x) at a = 0, n = 4 with x = 0.5 (error zero to ten decimals) and then with x far from 0 to watch the error column grow.
Absolute error is |true value - approximation|, the raw size of the miss in the function's own units. Relative error is the absolute error divided by the true value, times 100, so it reads as a percentage and lets you compare accuracy across different functions and scales. In the worked example the absolute error 0.0099484951 on e = 2.71828183 is a relative error of 0.365985%.
Yes. It runs entirely in your browser, needs no account, and stores nothing. Use Copy my results to grab a run as text or Share results to send it to another app.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Paul Dawkins, Lamar University. Calculus II - Taylor Series (Section 10.16) (derivation of the Taylor coefficient formula, nth-degree Taylor polynomial definition, worked e^x and cos(x) examples). Accessed October 24, 2026.
- OpenStax, Rice University. 6.3 Taylor and Maclaurin Series, Calculus Volume 2 (nth Taylor polynomial definition, Maclaurin special case, Taylor's theorem with the Lagrange remainder bound). Accessed October 24, 2026.
- Math Insight, University of Minnesota. Taylor polynomials: formulas refresher (Taylor's formula with remainder term, degree-n polynomial vs error term). Accessed October 24, 2026.
- LibreTexts, CLP-1 Differential Calculus. Approximating Functions Near a Specified Point - Taylor Polynomials (coefficient derivation from derivative matching, choosing the center with care). Accessed October 24, 2026.
- Active Calculus, Grand Valley State University. AC Taylor Polynomials (Section 8.2) (degree-n Taylor polynomial definition, coefficient formula c_k = f^(k)(a)/k!). Accessed October 24, 2026.
