What the formula says
n! = n · (n − 1)!
n! is read “n factorial” and is the product of every whole number from n down to 1:
5! = 5 · 4 · 3 · 2 · 1. The formula says the same thing recursively: each factorial is the number itself
times the factorial of the number below. The chain stops at 0! = 1. The formula is a definition, and
0! = 1 is part of it.
The factorial counts the ways n different things can be put in order. Three books on a shelf can stand in 3! = 6 orders. That is why it turns up in permutations, combinations and the binomial distribution.
Worked examples
Five. 5! = 5 · 4 · 3 · 2 · 1 = 120.
Using the recursion. If you know 6! = 720, then 7! = 7 · 720 = 5,040, without redoing the whole product.
A quotient. 5! / 3! = (5 · 4 · 3 · 2 · 1) / (3 · 2 · 1) = 5 · 4 = 20. Everything from 3 down cancels.
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5,040 |
| 8 | 40,320 |
| 9 | 362,880 |
| 10 | 3,628,800 |
| 11 | 39,916,800 |
| 12 | 479,001,600 |
Common mistakes
- Assuming 0! = 0. It is 1, and that is a definition, not a slip.
- Reading n! as n · 1. The exclamation mark means the whole product n · (n − 1) · … · 1.
- Cancelling 5! / 3! to 5 / 3. Factorials cancel factor by factor: 5! / 3! = 5 · 4 = 20.
Common questions
Why is 0! = 1?
So that the recursion holds all the way down: 1! = 1 · 0!, and since 1! = 1, 0! has to be 1. It also
fits the counting of orders: there is exactly one way to put nothing in order, which is to do nothing.
Is there a factorial of a decimal?
Not in this formula, which covers whole numbers from 0 up. There is an extension, the gamma function,
that gives values between the whole numbers too, but it belongs to university maths. Negative whole
numbers have no factorial at all.
How big is 20!?
2,432,902,008,176,640,000, about 2.4 · 10¹⁸. Eventually the factorial outgrows any power with a fixed
base or a fixed exponent: 170! is about 7.3 · 10³⁰⁶, and 171! is too large for a spreadsheet. A
calculator that stops at 10¹⁰⁰ only reaches 69!.