Factorial (n!): What It Means, Chart, Permutations and Combinations
The factorial of a whole number n, written n!, is the product of every whole number from n down to 1. So 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials count arrangements, which makes them central to probability.
Quick answer
- n! = n × (n − 1) × … × 2 × 1
- By definition, 0! = 1 and 1! = 1.
- As a result of all that multiplying, factorials grow very fast: 10! = 3,628,800.
Factorial chart
| n | n! |
|---|---|
| 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 |
| 13 | 6,227,020,800 |
| 14 | 87,178,291,200 |
| 15 | 1,307,674,368,000 |
And by definition, 0! is 1.
20! is about 2.43 × 1018; see scientific notation for writing numbers that large.
Why is 0! equal to 1?
Put simply, there’s exactly one way to arrange nothing. In addition, it keeps the pattern consistent: since n! equals n × (n − 1)!, we get 1! equal to 1 × 0!, which only works if 0! is 1.
Permutations: order matters
The number of ways to arrange r items chosen from n is nPr = n! ÷ (n − r)!. For example, for gold, silver and bronze among 8 runners: 8! ÷ 5! = 8 × 7 × 6 = 336. Similarly, arranging all n items is simply n!: 5 books on a shelf can go in 120 orders.
Combinations: order doesn’t matter
The number of ways to choose r items from n is nCr = n! ÷ (r! × (n − r)!). For instance, picking 3 people from 8 for a committee: 336 ÷ 3! = 56. That’s fewer than the permutations, because each group of 3 can be ordered 6 ways.
| n, r | Permutations (nPr) | Combinations (nCr) |
|---|---|---|
| 5, 2 | 20 | 10 |
| 6, 3 | 120 | 20 |
| 8, 3 | 336 | 56 |
| 10, 4 | 5,040 | 210 |
| 52, 5 | 311,875,200 | 2,598,960 |
In fact, the last row is the number of different 5-card poker hands from a 52-card deck: 2,598,960.
Using factorials for probability
For example, if a lottery draws 6 numbers from 49, there are 13,983,816 possible combinations, so one ticket has a 1 in 13,983,816 chance. See the probability formula.
On a calculator or spreadsheet
Use the n! or x! key. In Excel and Google Sheets: =FACT(5), =PERMUT(8,3) and =COMBIN(8,3).
Frequently asked questions
What is a factorial?
The product of all whole numbers from n down to 1, written n!.
How much is 5 factorial?
120.
Why is 0! = 1?
There’s one way to arrange nothing, and it keeps n! = n × (n − 1)! consistent.
What’s the difference between permutations and combinations?
Permutations count ordered arrangements; combinations count groups where order doesn’t matter.
