calc.ing

Factorial

Product of descending integers.

5102050100

What does Factorial mean?

The factorial of a non-negative integer n, written as n!, is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. By convention, 0! is defined as 1. Factorials grow extremely fast and are fundamental in combinatorics, probability, algebra, and mathematical analysis.

How to calculate Factorial

To calculate n!, multiply all integers from 1 up to n: n! = 1 x 2 x 3 x ... x n. For example, 7! = 1 x 2 x 3 x 4 x 5 x 6 x 7 = 5,040. You can also use the recursive definition: n! = n x (n-1)!. The number of digits in n! can be computed using Stirling's approximation or simply by counting the digits of the result.

FAQ

By convention, 0! = 1. This is called the empty product — the product of no numbers at all is defined as the multiplicative identity, which is 1. This definition ensures that many mathematical formulas, such as the binomial coefficient and Taylor series, work correctly for edge cases.

Factorials grow faster than exponential functions. For example, 10! = 3,628,800, 20! = 2,432,902,008,176,640,000, and 100! has 158 digits. By around 170!, the number exceeds what a standard 64-bit floating point can represent, which is why this calculator uses arbitrary-precision arithmetic.

Factorials appear in permutations (n! ways to arrange n items), combinations (n choose k = n! / (k!(n-k)!)), probability calculations, Taylor series in calculus, and many areas of discrete mathematics and computer science.

The factorial function is only defined for non-negative integers (0, 1, 2, 3, ...). However, the Gamma function extends the concept to real and complex numbers, where Gamma(n) = (n-1)! for positive integers.

This calculator supports values of n up to 1,000. The result of 1000! has 2,568 digits. The calculation uses arbitrary-precision integers (BigInt), so the result is exact regardless of size.

Related calculators