Factorial Sum Calculator

Calculate the exact sum of factorials from one number to another, with arbitrary-precision arithmetic, examples, sigma notation, formulas and step-by-step factorial values.

Calculate a Sum of Factorials

The first factorial in the sum. For example, enter 1 for \(1!\).
The last factorial included in the sum.

What Is a Factorial?

The factorial of a non-negative integer \(n\), written as \(n!\), is the product of all positive integers from \(1\) to \(n\).

\[ n! = n(n-1)(n-2)\cdots 3\cdot2\cdot1 \]

For example:

\[ 5! = 5\times4\times3\times2\times1 = 120 \]

Two important special cases are:

\[ 0! = 1 \qquad\text{and}\qquad 1! = 1 \]

Factorials are widely used in combinatorics, permutations, probability, series, binomial coefficients and many areas of mathematics.

What Is a Sum of Factorials?

A factorial sum adds several factorial values together. For example, the sum of factorials from \(1\) to \(5\) is:

\[ 1!+2!+3!+4!+5! \]

Substituting the factorial values gives:

\[ 1+2+6+24+120=153 \]

In sigma notation, a factorial sum from \(a\) to \(b\) can be written as:

\[ \sum_{n=a}^{b} n! \]

This calculator evaluates that finite sum exactly for the range you enter.

Does the Sum of Factorials Have a Formula?

A common question is whether a sum such as \(\sum_{k=1}^{n}k!\) can be simplified to a simple formula in the same way as the sum of squares or the sum of cubes.

\[ \sum_{k=1}^{n} k! = 1!+2!+3!+\cdots+n! \]

Unlike familiar polynomial sums such as \(\sum k\), \(\sum k^2\), and \(\sum k^3\), there is no simple elementary closed-form formula for the ordinary finite sum \(\sum_{k=1}^{n} k!\).

This is important when using a factorial sum calculator: the exact result is obtained by calculating the factorials and adding them, rather than by incorrectly applying a formula for another type of series.

For example:

\[ \sum_{k=1}^{5}k! = 1!+2!+3!+4!+5! = 153 \]

For large values of \(n\), factorials grow extremely quickly. This calculator therefore uses exact arbitrary-precision integer arithmetic instead of ordinary floating-point numbers.

Factorial Sum Examples

These examples show common factorial-sum calculations.

Sum of Factorials 1 to 3

\[ 1!+2!+3! \]
\(1+2+6=9\)

Sum of Factorials 1 to 4

\[ 1!+2!+3!+4! \]
\(1+2+6+24=33\)

Sum of Factorials 1 to 5

\[ 1!+2!+3!+4!+5! \]
\(153\)

Sum of Factorials 1 to 6

\[ 1!+2!+3!+4!+5!+6! \]
\(873\)

Factorials 3 to 6

\[ 3!+4!+5!+6! \]
\(6+24+120+720=870\)

Factorials 0 to 5

\[ 0!+1!+2!+3!+4!+5! \]
\(154\)

Factorials and Combinatorics

Factorials are fundamental to combinatorics. For example, the number of ways to arrange \(n\) distinct objects is:

\[ n! \]

Factorials also appear in binomial coefficients:

\[ \binom{n}{k} = \frac{n!}{k!(n-k)!} \]

This is why factorial calculations are closely related to permutations, combinations, Pascal's triangle and binomial sums.

Large Factorials and Exact Arithmetic

Factorials become very large very quickly. For example:

\[ 10! = 3,628,800 \]

Even larger factorials contain many digits. Ordinary floating point variables are not appropriate when an exact integer result is required.

This calculator uses GMP arbitrary-precision integer arithmetic so that factorials and their sums are calculated exactly without floating-point rounding.

The calculator accepts ending values up to 5,000 and limits the detailed step-by-step table for very large ranges to keep the page manageable.

Factorial Sums in Sigma Notation

Sigma notation provides a compact way to write a factorial sum. Instead of writing every factorial individually, you can write:

\[ \sum_{k=a}^{b} k! \]

For example, the sum of factorials from \(3\) to \(6\) is:

\[ \sum_{k=3}^{6} k! = 3!+4!+5!+6! = 870 \]

If you want to work with general finite summations rather than factorials specifically, use the Sigma Calculator .

Related Sum and Series Calculators

More Mathematical Calculators

Frequently Asked Questions

What is the formula for the sum of factorials?

A finite factorial sum can be written as:

\[ \sum_{k=a}^{b} k! \]

Unlike sums of powers such as \(\sum k^2\), there is no simple elementary closed-form formula for the ordinary finite sum \(\sum_{k=1}^{n}k!\).

What is \(0!\)?

By definition:

\[ 0! = 1 \]

What is \(1!\)?

\(1! = 1\).

What is \(5!\)?

\(5! = 5\times4\times3\times2\times1 = 120\).

What is the sum of factorials from 1 to 5?

\[ 1!+2!+3!+4!+5! = 153 \]

What is the sum of factorials from 3 to 6?

\[ 3!+4!+5!+6! = 870 \]

Can this calculator handle large factorials?

Yes. The calculator uses arbitrary-precision integer arithmetic through GMP, allowing the result to remain exact even when the factorial values become much larger than standard integer types.

Can the calculator show every factorial in the sum?

Yes, when the range contains up to 51 terms. Larger calculations are still performed exactly, but the detailed table is hidden to keep the page manageable.

What is the difference between a factorial and a factorial sum?

A factorial is one product, such as \(5! = 120\). A factorial sum adds several factorials together, such as:

\[ 1!+2!+3!+4!+5! \]

This calculator calculates the latter.