Build your Taylor polynomial
Pick a function, a center point a, the order n, and the evaluation point x. The calculator returns the polynomial, the term list, and the approximation error.
Generate a Taylor series (or Maclaurin series) and instantly build a Taylor polynomial approximation for common functions. Choose a function, pick the center a, select the order n, and evaluate at x to see the approximation, the true value, and the error — in one click.
Pick a function, a center point a, the order n, and the evaluation point x. The calculator returns the polynomial, the term list, and the approximation error.
A Taylor series is a way to rewrite a smooth function f(x) as an infinite sum of polynomial terms around a chosen center point a. In plain English: you “zoom in” on a function near a, and the curve starts behaving like a polynomial — and polynomials are easy to compute, graph, and approximate by hand.
Taylor series about a: f(x) = Σ (k=0 to ∞) [ f^(k)(a) / k! ] · (x − a)^k Taylor polynomial of order n (finite truncation): P_n(x) = Σ (k=0 to n) [ f^(k)(a) / k! ] · (x − a)^k
Here, f^(k)(a) means the k-th derivative evaluated at a, and k! (k factorial) is the product k · (k−1) · … · 1. The factorial grows fast, which is one reason Taylor terms often shrink rapidly when x is close to a.
A Maclaurin series is simply a Taylor series centered at a = 0. So when you hear “Maclaurin,” you can mentally replace it with “Taylor around zero.” Many famous series in calculus are Maclaurin series because the derivatives at 0 are simple.
The key idea is that you can trade off speed vs accuracy by choosing the order n. Higher n usually means a better match near a, but also more computation and longer expressions.
This tool generates the Taylor polynomial by using known derivative patterns for the most common “calculus superstar” functions. For example:
e^x = e^a · Σ (k=0..∞) (x−a)^k / k!
sin^(k)(a) cycles: sin(a), cos(a), −sin(a), −cos(a), …
cos^(k)(a) cycles: cos(a), −sin(a), −cos(a), sin(a), …
For ln(1+x), arctan(x), and 1/(1−x), this page uses their classic Maclaurin expansions (centered at 0), because those are the versions people most often need. If you pick a different center a for these Maclaurin-only options, the calculator will warn you and treat it as a Maclaurin expansion (a = 0) so you don’t accidentally rely on a series you didn’t mean to use.
After building P_n(x), the calculator evaluates the true function value f(x) using JavaScript’s built-in math functions, then computes:
Absolute error: |P_n(x) − f(x)| Relative error: |P_n(x) − f(x)| / (|f(x)| + tiny)
The error meter is a simple visual: lower error fills the bar toward “Low error.” It’s not a formal bound, but it’s great for quick intuition.
Example 1Approximate e^0.5 with n = 6, a = 0
Choose e^x, set a = 0, n = 6, x = 0.5. The Maclaurin polynomial is:
P_6(x) = 1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6!
Plugging in x = 0.5 gives a value that is typically very close to the true e^0.5 ≈ 1.6487… because exp’s series converges fast and smoothly for all real x.
Example 2Small-angle sin approximation near 0
Choose sin(x), set a = 0, and try n = 3. You’ll recognize the famous physics approximation:
sin(x) ≈ x − x^3/3!
For x = 0.1 radians, that’s already extremely accurate. For x = 1 radian, you’ll need more terms to keep the error small — the calculator makes that easy to test.
Example 3cos(x) about a = π/3 (center shift)
Set the function to cos(x), choose a = 1.0471975512 (≈ π/3), pick a modest order like n = 6, and evaluate at a nearby x such as 1.1. Because x is close to a, (x − a) is small, so the polynomial converges quickly.
Example 4Why ln(1+x) needs |x| < 1
Choose ln(1+x) and try x = 0.5 versus x = 1.2. At x = 0.5, the series behaves nicely:
ln(1+x) = x − x^2/2 + x^3/3 − x^4/4 + …
But at x = 1.2, you’re outside the radius of convergence for the Maclaurin series (|x| < 1), so adding more terms won’t reliably fix it. The calculator warns you so you don’t get tricked by a “bigger n” feeling that isn’t true for every series.
The Taylor series is the infinite sum (in theory). The Taylor polynomial is what you actually compute in practice — the finite truncation P_n(x) up to order n. Most real-world uses rely on the polynomial.
Start small (like 6–10). If your error is still too large, increase n. The “best” n depends on how far x is from a and how quickly the series terms shrink. For exp/sin/cos, increasing n tends to help predictably. For series with limited radius, n won’t fix being outside the convergence region.
Taylor terms are powers of (x − a). If (x − a) is small, then (x − a)^k becomes tiny as k grows, which makes later terms negligible (good for convergence). If (x − a) is large, higher powers explode and you need many more terms (or the series may fail to converge for that function/center).
It’s the distance from the center a within which the Taylor series actually converges to the function. For ln(1+x) around 0, the radius is 1 because the function has a singularity at x = −1. For 1/(1−x) around 0, the radius is also 1 because there’s a singularity at x = 1. In contrast, sin, cos, and exp are “entire” functions whose series converge for all real x.
Not always. If you’re outside the convergence region (like ln(1+x) at x = 1.2 for Maclaurin), increasing n won’t help. Also, extremely large n can introduce floating-point rounding issues. That’s why this tool caps n at 30 and shows the actual measured error.
This page is built for real-valued inputs. Taylor series extend to complex numbers, but JavaScript’s built-in Math functions are real-only. If you need complex expansions, use a CAS tool (Mathematica, Maple, SymPy) and verify convergence in the complex plane.
No — it’s a quick visual based on the computed absolute error at your chosen x. Formal remainder bounds (like Lagrange’s remainder) depend on the maximum value of a derivative over an interval, which is more advanced than most quick-use calculators. For learning, seeing the real error is often the most helpful.
MaximCalculator provides simple, user-friendly tools. Always treat results as educational approximations and double-check any important numbers elsewhere.