What is a factorial
The factorial of a positive whole number n, written as n!, is the product of every integer from 1 up to n. For example, 5! equals 5 × 4 × 3 × 2 × 1, which is 120. Factorials grow extremely fast: 10! already passes 3 million, and 20! has 19 digits. This calculator uses arbitrary-precision arithmetic internally, so the result is always exact, even for numbers with thousands of digits.
Why 0! equals 1
By convention, 0! is defined as 1. This definition doesn't come from an actual multiplication, but from keeping formulas that use factorials, like permutations and combinations, consistent even when one of the terms involved is zero.
Where the factorial shows up
Besides standing on its own, the factorial is the foundation of formulas like permutations and combinations, used to count arrangements and groupings of items. For those ready-made calculations, use the permutation calculator.
Practical example
In a tournament with 20 teams, working out how many ways the teams could be ranked from first to last place involves 20!, a number with 19 digits: 2,432,902,008,176,640,000.