Taylor Series Calculator
Taylor series calculator that builds the Taylor polynomial of a function f(x) around a point a up to degree n. Shows coefficients, polynomial, numerical approximation and error, plus a plot comparing f(x) and its Taylor approximation.
Full original guide (expanded)
Taylor Series Calculator
Taylor polynomial of f(x) around a point aBuild a Taylor polynomial for \(f(x)\) around \(a\) up to degree \(n\), with coefficients, series form, and a comparison to the original function.
Shows the series terms and approximation error at a chosen point.
1. Define the function and expansion
Use x, operators +, -, *, /, ^, and functions sin, cos, tan, exp, log, sqrt, etc.
Set \(a = 0\) for a Maclaurin series.
Higher degree ⇒ usually better approximation near \(a\), but more terms.
If set, the calculator compares \(f(x)\) and \(P_n(x)\).
2. Polynomial, values and error
3. Plot of \(f(x)\) and its Taylor approximation
The plot shows the original function \(f(x)\) and the Taylor polynomial \(P_n(x)\) on an interval centred at \(a\). By default the interval is \([a - 2, a + 2]\); if \(|x - a|\) is larger, the interval is enlarged to include the evaluation point.
4. Derivatives and coefficients table
Each row shows the numerical estimate of the \(k\)-th derivative at \(a\), the coefficient \(a_k = \frac{f^{(k)}(a)}{k!}\), and the corresponding term of the polynomial.
| k | f(k)(a) | k! | ak | Term ak(x−a)k |
|---|
Definition of Taylor series and Taylor polynomial
Let \(f\) be a function that is differentiable many times near a point \(a\). The Taylor series of \(f\) at \(a\) is the formal series
where \(f^{(k)}(a)\) is the \(k\)-th derivative of \(f\) at \(a\) and \(k!\) is the factorial of \(k\). The Taylor polynomial of degree \(n\) is the partial sum
For many standard functions (polynomials, exponentials, trigonometric and logarithmic functions on suitable intervals) the Taylor series converges to \(f(x)\) in a neighbourhood of \(a\). The polynomial \(P_n(x)\) is the best local polynomial approximation of degree \(n\) determined by the derivatives at \(a\).
Remainder term and approximation error
When the Taylor series converges, it is useful to write
where \(R_n(x)\) is the remainder term. Under suitable smoothness conditions one has the Lagrange form
In this calculator, the numerical error at a specific point \(x\) is simply computed as \(|f(x) - P_n(x)|\).
Maclaurin series as a special case
If \(a = 0\), the Taylor series is called a Maclaurin series:
Many classic expansions are Maclaurin series, for example
- \(e^x = 1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \dots\)
- \(\sin x = x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dots\)
- \(\cos x = 1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dots\)
FAQ: using the Taylor series calculator
1. Which functions can I enter?
You can enter any function that can be evaluated numerically, for example: exp(x), sin(x), cos(x), log(1 + x), x^3 - 2*x + 1. The calculator builds a JavaScript function from your expression and uses numerical differentiation.
2. Why do very high degrees sometimes look unstable?
High-order numerical derivatives are sensitive to rounding errors. For large degrees or functions with rapid oscillations, coefficients can become inaccurate. In practice, it is wise to keep \(n \leq 10\) and check the plot and error to ensure the approximation behaves as expected.
3. How should I choose the expansion point a?
The Taylor polynomial gives the best approximation near the expansion point. If you want a good approximation around \(x = x_0\), choose \(a\) close to \(x_0\). A Maclaurin series (\(a = 0\)) is convenient when the function is easily differentiable at 0 and you care about behaviour near the origin.
4. Does the series converge for every x?
No. Each Taylor series has a radius of convergence, which can be finite. Outside that radius the series may diverge, even if the function itself is defined. This calculator focuses on computing partial sums; convergence analysis is a separate theoretical step.
Formula (LaTeX) + variables + units
f(x) \sim \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!}(x-a)^k,
P_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k.
f(x) = P_n(x) + R_n(x),
R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}
f(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k.
','\
\[ f(x) \sim \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!}(x-a)^k, \]
\[ P_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k. \]
\[ f(x) = P_n(x) + R_n(x), \]
\[ R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1} \] for some \(\xi\) lying between \(a\) and \(x\). Although \(\xi\) is usually unknown, bounds on \(f^{(n+1)}\) make it possible to estimate \(|R_n(x)|\).
- T = property tax (annual or monthly depending on input) (currency)
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Last code update: 2026-01-19
- Initial audit spec draft generated from HTML extraction (review required).
- Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
- Confirm sources are authoritative and relevant to the calculator methodology.