Key takeaways
- n! = n × (n − 1) × (n − 2) × … × 2 × 1.
- n! counts the ways to arrange n different things in a row.
- 0! = 1, not 0. There is exactly one way to arrange nothing.
- Factorials grow very fast: 10! is already 3,628,800.
In this guide
What is a factorial?
Say you have 3 books: A, B and C. How many ways can you line them up on a shelf? You have 3 choices for the first spot, then 2 left for the second, then 1 for the last. That is 3 × 2 × 1 = 6 ways. We write this as 3!, read '3 factorial'.
So a factorial is a whole number multiplied by every whole number below it, down to 1.
Why do factorials matter?
Factorials are the building blocks of counting. Any time you ask 'how many different orders?', a factorial is hiding in the answer. They also appear in probability, in the binomial formula and in calculus.
Factorials grow faster than powers. 10! is about 3.6 million, but 20! is already more than 2 billion billion.
The formula
| Symbol | What it means | Example |
|---|---|---|
| n | A whole number, 0 or bigger | 6 |
| n! | The product from n down to 1 | 720 |
| 0! | Defined as 1 | 1 |
Factorials are not defined for negative numbers. This calculator rounds n to the nearest whole number and can show results up to 170!. Anything bigger is too large for a normal computer number.
How to calculate a factorial step by step
- 1Write down n. Check it is a whole number, 0 or more.
- 2Multiply by the next number down. n × (n − 1).
- 3Keep going. Multiply by n − 2, n − 3 and so on.
- 4Stop at 1. The final product is n!.
Now pick any whole number and let the calculator below multiply it out for you.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Adding instead of multiplying. 4! is
4 × 3 × 2 × 1 = 24, not4 + 3 + 2 + 1 = 10. - Stopping too early. 5! does not stop at 5 × 4. Go all the way down to 1.
- Using a negative or decimal n. The normal factorial only works for whole numbers 0, 1, 2, 3 and so on.
- Underestimating the size. 13! is already more than 6 billion.
Tips and tricks
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 3 | 6 |
| 5 | 120 |
| 6 | 720 |
| 10 | 3,628,800 |
- Cancel before you multiply.
10! ÷ 8! = 10 × 9 = 90. The rest cancels out. - Only some of the places? For ordered picks use the permutations (nPr) calculator. For groups where order does not matter, use the combinations (nCr) calculator.
Where you'll use it in real life
- Races and rankings: the number of possible finishing orders.
- Scheduling: the ways to order a list of tasks or visits.
- Probability: inside the binomial probability formula.
- Passwords and codes: counting codes where each symbol is used once.
Quick summary
A factorial multiplies a whole number by every whole number below it down to 1, and 0! is 1. It counts how many ways you can arrange things in order. Use the calculator above to get any factorial up to 170! with every step shown.
Worked example
Six runners are in a race and you want to know how many different finishing orders are possible, from first place to last place.
- 01n! = n × (n-1) × ... × 2 × 1
- 026! = 6 × 5 × 4 × 3 × 2 × 1
- 036! = 720
These numbers are pre-filled in the calculator above.
Frequently asked questions
Why is 0 factorial equal to 1?
There is exactly one way to arrange zero objects: do nothing. Setting 0! = 1 also keeps formulas like nCr = n! ÷ (r!(n − r)!) working when r = 0 or r = n.
Can you take the factorial of a negative number or a decimal?
Not with the normal definition. Factorials are for whole numbers 0, 1, 2, 3 and so on. This calculator rounds a decimal to the nearest whole number first.
What is 10 factorial?
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800.
How many ways can you shuffle a deck of cards?
52!, which is about 8.07 × 10⁶⁷. That is so large that a well-shuffled deck is almost certainly in an order no one has ever seen before.


