Home › Calculators › Taylor Series Calculator

Taylor Series Calculator

Type a function, pick the center a and the order n, and get the Taylor polynomial with exact coefficients, every derivative value f⁽ᵏ⁾(a), the error at a point of your choice and a graph of f(x) against its approximation. Center 0 gives the Maclaurin series.

Last updated:

Use x as the variable. Supports + − * / ^, sin cos tan sec csc cot, asin acos atan, sinh cosh tanh, exp, ln, log, sqrt, cbrt, abs, pi and e. 2x and 3sin(x) work too.

0 gives a Maclaurin series. pi/4 works.

Highest power, 0 to 40.

Shows f(x), Pn(x) and the approximation error.

Advertisement
Advertisement

How to use the Taylor Series Calculator

  1. Type the function f(x), for example e^x, sin(x)/x or ln(1+x), or tap an example.
  2. Choose the center a: 0 for a Maclaurin series, or any point such as 1 or pi/4.
  3. Set the order n, the highest power of (x − a) to keep.
  4. Press Calculate Taylor series to see the polynomial, the coefficient table and the graph.
  5. Enter a value in Compare at x to see how close Pₙ(x) is to f(x), then copy the polynomial or download the coefficients.

The Taylor polynomial formula

For a function f that can be differentiated n times at x = a, the Taylor polynomial of order n is

Pn(x) = f(a) + f′(a)(x − a) + f″(a)/2! · (x − a)² + … + f(n)(a)/n! · (x − a)n

The coefficient of (x − a)k is ck = f(k)(a)/k!, so if you know the coefficient you also know the k-th derivative: f(k)(a) = k! · ck. That is why the table above lists both. The polynomial agrees with f in value, slope, curvature and every derivative up to order n at the center, which is what makes it the best polynomial approximation near a.

The remainder (error) after n terms is given by Lagrange's form of Taylor's theorem: Rn(x) = f(n+1)(ξ)/(n+1)! · (x − a)n+1 for some ξ between a and x. If |f(n+1)| ≤ M on that interval, then |Rn(x)| ≤ M·|x − a|n+1/(n+1)!. For sin x and cos x, M = 1, so P7 of sin x at x = 1 is guaranteed to be within 1/8! ≈ 0.0000248.

Common Maclaurin series

f(x)Maclaurin seriesConverges for
eˣ1 + x + x²/2! + x³/3! + x⁴/4! + …all x
sin xx − x³/3! + x⁵/5! − x⁷/7! + …all x
cos x1 − x²/2! + x⁴/4! − x⁶/6! + …all x
1/(1 − x)1 + x + x² + x³ + …|x| < 1
ln(1 + x)x − x²/2 + x³/3 − x⁴/4 + …−1 < x ≤ 1
arctan xx − x³/3 + x⁵/5 − x⁷/7 + …|x| ≤ 1
(1 + x)r1 + rx + r(r−1)/2! · x² + r(r−1)(r−2)/3! · x³ + …|x| < 1
sinh xx + x³/3! + x⁵/5! + …all x
cosh x1 + x²/2! + x⁴/4! + …all x
tan xx + x³/3 + 2x⁵/15 + 17x⁷/315 + …|x| < π/2

Tips for good approximations

  • Center the series close to where you need it. To approximate ln(1.2), expand ln(x) about a = 1, not about a distant point.
  • Watch the radius of convergence. Outside it the polynomial diverges however many terms you add; the graph makes this easy to see for 1/(1 − x).
  • Odd and even functions have only odd or only even powers in their Maclaurin series (sin x is odd, cos x is even), so P7 and P8 of sin x are the same polynomial.
  • Substitution is a shortcut: the series of e−x² is the series of eᵗ with t = −x², which is why its coefficients are 1, −1, 1/2, −1/6, …

Frequently asked questions

What is a Taylor series?

A Taylor series writes a smooth function as an infinite sum of powers of (x − a): f(x) = Σ f⁽ᵏ⁾(a)/k! · (x − a)ᵏ. Keeping the terms up to power n gives the Taylor polynomial Pₙ(x), which matches f and its first n derivatives at x = a.

What is the difference between a Taylor and a Maclaurin series?

A Maclaurin series is simply a Taylor series centered at a = 0, so it uses powers of x instead of powers of (x − a). For example the Maclaurin series of eˣ is 1 + x + x²/2! + x³/3! + …

How does the calculator find the derivatives?

It uses power-series arithmetic (automatic differentiation): each operation in your function, such as multiplication, division, exp, ln or sin, is applied to truncated series instead of single numbers. This gives the derivatives at the center to full machine precision without numerical differencing, and the coefficients are then shown as exact fractions when they match one.

How accurate is the Taylor polynomial?

Near the center it is usually very accurate, and the error shrinks as n grows if x is inside the radius of convergence. By Taylor's theorem the error is R_n(x) = f⁽ⁿ⁺¹⁾(ξ)/(n+1)! · (x − a)ⁿ⁺¹ for some ξ between a and x. The calculator shows the actual error at the x you choose.

Why does the polynomial get worse far from the center?

A Taylor series only converges inside its radius of convergence, which is the distance from a to the nearest point where the function stops being analytic (in the complex plane). For 1/(1 − x) or ln(1 + x) about 0 the radius is 1, so beyond |x| = 1 adding more terms makes the approximation worse, not better. For eˣ, sin x and cos x the radius is infinite.

Why do I get an error for some centers?

A Taylor series exists only where the function is infinitely differentiable. ln(x) and √x at 0, 1/x at 0, |x| at 0 and tan(x) at π/2 have no Taylor series there, so the calculator explains the problem instead of returning wrong numbers. Move the center to a point where the function is smooth, for example ln(x) about a = 1.

Can it expand functions like sin(x)/x?

Yes. Removable singularities are handled automatically: sin(x)/x about 0 gives 1 − x²/6 + x⁴/120 − …, and (eˣ − 1)/x gives 1 + x/2 + x²/6 + …

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Laplace Transform CalculatorLaplace transform of f(t) with the table rule used for each term and the region of convergence.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Algebra CalculatorSimplify, expand and factor algebraic expressions with exact answers and step-by-step working.Perpendicular Line CalculatorEquation of the perpendicular and parallel line through a point, with distance and a graph.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Polynomial CalculatorAdd, subtract, multiply, divide and evaluate polynomials; see roots, degree and a graph.Polynomial Long Division CalculatorDivide polynomials with the full long division layout, quotient, remainder and steps.Scale Factor CalculatorScale factor between similar figures, plus scaled lengths, areas (k²) and volumes (k³).Set CalculatorUnion, intersection, difference and complement of up to 4 sets, with a Venn diagram and counts.Table of Values CalculatorMake an x/y table for any function with a start, end and step, then plot it or copy CSV.Determinant CalculatorDeterminant of a 2×2 to 8×8 matrix with exact fractions and cofactor or row-reduction steps.Differential Equation SolverSolve first- and second-order ODEs step by step, with initial conditions, an RK4 check and a graph.Domain and Range CalculatorFind the domain and range of a function in interval notation, with steps and a graph.Eigenvalue and Eigenvector CalculatorEigenvalues (real or complex), eigenvectors and the characteristic polynomial of a square matrix.Equation SolverSolve any equation for x: exact roots, complex roots, numeric answers, steps and a graph.Inequality CalculatorSolve linear, quadratic, rational and absolute value inequalities with steps and a number line.Inverse Function CalculatorFind the inverse f⁻¹(x) of a function with steps, domain restrictions and a graph.Limit CalculatorEvaluate limits at a point or at infinity, one-sided or two-sided, with steps, table and graph.Linear Interpolation CalculatorInterpolate or extrapolate y for any x from two points or a data table, with steps and a plot.Matrix Inverse CalculatorFind the inverse of a 2×2 to 8×8 matrix in exact fractions with Gauss–Jordan or adjugate steps.Partial Derivative CalculatorPartial derivatives ∂/∂x, ∂/∂y, second and mixed orders with steps, gradient and Hessian.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.Extended Euclidean Algorithm CalculatorFind gcd(a, b) and Bézout coefficients x, y with the full step-by-step division table.Factor Tree GeneratorDraw the prime factor tree of any number as a printable diagram, with exponent form and steps.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.X and Y Intercept CalculatorFind the x- and y-intercepts of lines, curves and functions with steps and a graph.Line Intersection CalculatorFind where two lines cross from equations, points or slopes, with parallel checks and a graph.
See all 74 Algebra & Calculus Calculators →