Factorial Calculator
Calculate n! exactly for any whole number up to 3,000, with its digit count, trailing zeros and scientific notation.
Change the values and press Calculate to work out your own figures.
Enter a whole number n to get n! = n × (n − 1) × … × 2 × 1.
Show the working
- 25! = 25 × 24 × … × 2 × 1
- = 15,511,210,043,330,985,984,000,000
How to use it
Enter a whole number n to get n! = n × (n − 1) × … × 2 × 1.
The answer is exact: whole numbers of any size up to 30 digits are handled without rounding, and Show the working lists every step.
Key facts
n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Why 0! is 1
There is exactly one way to arrange nothing, and the rule n! = n × (n − 1)! only works for n = 1 if 0! = 1.
Trailing zeros
Each trailing zero comes from a factor of 10 = 2 × 5, and there are always more 2s than 5s, so count the 5s: 25! has 25 ÷ 5 + 25 ÷ 25 = 6 trailing zeros.
Questions
What is 5 factorial?
5! = 5 × 4 × 3 × 2 × 1 = 120.
What is 0 factorial?
1, by definition.
Formulas
n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Sources
Limitations
- Numbers have at most 30 digits; factor lists and prime factorizations are limited to 10¹².