How to use the Factorial Calculator
- Enter a whole number n.
- Read n!, its number of digits and trailing zeros.
- Copy the full value if you need every digit.
What does this tool do?
The factorial n! is the product of every whole number from 1 to n: 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1. Factorials count arrangements — n! is the number of ways to order n different items.
Factorials grow incredibly fast: 20! already exceeds 2 quintillion and 100! has 158 digits. The calculator uses exact big-integer arithmetic, so every digit is correct.
Why use it?
- Exact — no rounding, even for huge results.
- Counts digits and trailing zeros.
- Instant, in your browser.
Use cases
- Permutations and combinations in probability.
- Maths homework and competition practice.
- Testing big-integer code.
How fast factorials grow
A few values:
| n | n! |
|---|---|
| 5 | 120 |
| 10 | 3,628,800 |
| 20 | 2,432,902,008,176,640,000 |
| 52 | ≈ 8.07 × 10⁶⁷ (ways to shuffle a deck of cards) |
| 100 | 158 digits, ending in 24 zeros |
Common mistakes
- Thinking 0! is 0 — it's 1.
- Using factorials for non-whole numbers; that needs the gamma function.
- Calculating big factorials with floating point, which loses digits after about 22!.
The formula
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Frequently asked questions
Why does n! end in so many zeros?
Each pair of factors 2 and 5 produces a trailing zero. There are always more 2s than 5s, so the count of 5s decides it.
How are factorials used in combinations?
Choosing r from n is n! ÷ (r! × (n − r)!). For example, 5 from 52 cards gives 2,598,960 poker hands.
Why is 0! equal to 1?
There's exactly one way to arrange nothing, and it keeps formulas like n! = n × (n − 1)! working.
How large can n be?
Up to 5,000, calculated exactly.
Content last updated . See how M2Toolkit works.