Factorial Calculator
Compute n! exactly, with the full expansion.
0! = 1 by definition.
A factorial n! multiplies every whole number from n down to 1, counting how many ways n distinct items can be ordered. So 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention 0! = 1, and factorials grow extremely fast.
What a factorial counts
The factorial n! multiplies every whole number from n down to 1. Concretely, it counts the number of ways to arrange n distinct items in order — there are 5! = 120 orderings of five books on a shelf. Factorials grow ferociously fast, which is why they appear wherever you count arrangements: permutations, combinations, probability, and Taylor series.
with the convention 0! = 1; defined for whole numbers n ≥ 0
Worked example
Compute 5!:
- 1 Write the descending product. 5! = 5 × 4 × 3 × 2 × 1.
- 2 Multiply step by step. 5 × 4 = 20, then 20 × 3 = 60, then 60 × 2 = 120, then 120 × 1 = 120.
- 3 Read the result. 5! = 120 — the number of ways to order five distinct books. Note 5! = 5 × 4!, since 4! = 24.
Factorials of small numbers
Each value is the previous one times n — they explode quickly.
| n | n! | Expansion |
|---|---|---|
| 0 | 1 | empty product |
| 1 | 1 | 1 |
| 2 | 2 | 2 × 1 |
| 3 | 6 | 3 × 2 × 1 |
| 4 | 24 | 4 × 3 × 2 × 1 |
| 5 | 120 | 5 × 4 × 3 × 2 × 1 |
| 6 | 720 | 6 × 5! |
| 10 | 3,628,800 | 10 × 9! |
Why 0! = 1, and where factorials lead
0! = 1. There is exactly one way to arrange nothing — the empty arrangement — so 0! is defined as 1. This keeps the combination and permutation formulas working at the edges.
The recursive pattern. n! = n × (n−1)!, so each factorial is built from the one before it. That recurrence is how the tool computes large values exactly.
Building blocks for counting. Permutations are nPr = n! ÷ (n−r)! and combinations are nCr = n! ÷ (r! · (n−r)!) — both rest entirely on factorials.