Factorial Calculator
n! for any whole number up to 1,000, with digit count.
20!
24,32,90,20,08,17,66,40,000
19 digits
- Trailing zeros
- 4
- Double factorial
- 3,71,58,91,200
How the factorial calculation works
n! = n × (n − 1) × … × 1, and 0! = 1. Factorials grow very quickly: 20! is about 2.4 × 10^18 and 100! has 158 digits. Trailing zeros equal the count of factors of 5 in n!.
How to use this calculator
- n. Type a number or drag the slider.
- Read the result. It updates as you type, with a breakdown. Use Copy result to save it.
Worked example
With n 20, the result is 20!: 24,32,90,20,08,17,66,40,000 (19 digits). The result also breaks down into: trailing zeros; double factorial.
Tips and common mistakes
The factorial of n is the product of all whole numbers from 1 to n.
- 0 factorial is defined as 1.
- Factorials get very large very fast.
- They are used in permutations and combinations.
Frequently asked questions
Why is 0! equal to 1?
By definition, which keeps formulas like nCr consistent. There is exactly one way to arrange nothing.
Where are factorials used?
In permutations, combinations, probability and series expansions.
How many zeros does 100! end with?
Twenty-four, since 100 ÷ 5 + 100 ÷ 25 = 24.
Last reviewed 2026-10-30. Results are estimates for planning only. Read the disclaimer.