What a Factorial Is, Why n! Grows So Fast, and Where It Shows Up
A plain-English guide to the factorial: what n! means, why it explodes past 10!, its role in permutations, combinations, and probability, and why 0! = 1.
What a Factorial Is, Why n! Grows So Fast, and Where It Shows Up
The factorial is one of the first pieces of math that feels almost rude in how quickly it gets out of hand. You start multiplying small whole numbers, the answer stays friendly for a moment, and then it isn't friendly at all. This post walks through what a factorial actually is, why it grows the way it does, where it earns its keep in counting and probability, and why the strange-looking rule 0! = 1 is not a typo.
What n! Actually Means
A factorial takes a non-negative whole number and multiplies it by every whole number below it down to 1. The notation is the number followed by an exclamation mark, and the definition reads:
n! = n × (n − 1) × (n − 2) × ... × 2 × 1
So 3! = 3 × 2 × 1 = 6, and 4! = 4 × 3 × 2 × 1 = 24. There is also a cleaner way to think about it, the recurrence relation:
n! = n × (n − 1)!
Each factorial is just the number times the previous factorial. That single line tells you 5! is 5 times 4!, and 4! is 4 times 3!, all the way down. It also quietly explains the explosion you are about to see: every step doesn't add to the previous value, it multiplies it.
A Worked Example: From 5! to 10!
Let me run the numbers by hand, because seeing the growth is more convincing than being told about it.
- 5! = 5 × 4 × 3 × 2 × 1 = 120
- 6! = 6 × 120 = 720
- 7! = 7 × 720 = 5,040
- 8! = 8 × 5,040 = 40,320
- 9! = 9 × 40,320 = 362,880
- 10! = 10 × 362,880 = 3,628,800
So in five steps, from 5! to 10!, the answer jumps from a tidy 120 to over three and a half million. That is the recurrence at work: each new factor isn't adding a constant, it is scaling everything that came before. By the time you reach 13! you are already past two billion, and 20! is around 2.4 quintillion.
This is exactly where a lot of homemade factorial functions quietly break. A standard 64-bit number can hold integers precisely only up to about 9 quadrillion, and 21! sails right past that. After that point a calculator built on ordinary floating-point math starts returning wrong trailing digits without warning. If you want to confirm an answer past that line, the factorial calculator computes the whole product on arbitrary-precision integers, so 100! comes back as its full 158-digit value instead of a rounded approximation.
Why 0! Equals 1
The rule that trips everyone up is 0! = 1. It looks like multiplying nothing should give nothing, or maybe zero, so why one?
Two reasons, and both are about consistency rather than convenience. First, the recurrence n! = n × (n − 1)! has to keep working at the bottom. Plug in n = 1 and you get 1! = 1 × 0!. Since 1! is plainly 1, this equation forces 0! to be 1. Anything else breaks the pattern that defines factorials in the first place.
Second, there is a counting interpretation. A factorial answers the question "how many ways can I arrange n distinct items in a row?" There are 6 ways to line up three books (3! = 6) and 2 ways to line up two (2! = 2). How many ways are there to arrange zero items? Exactly one: the empty arrangement, where you do nothing and you are done. So 0! = 1 is not a special case bolted on afterward, it falls straight out of what a factorial is supposed to count.
Factorials in Permutations and Combinations
The reason factorials matter outside of a textbook is counting. Whenever you arrange or select things, factorials show up almost immediately.
A permutation counts ordered arrangements. The number of ways to pick and order r items from a pool of n is:
P(n, r) = n! / (n − r)!
The number of ways to seat 5 people in 5 chairs is just 5! = 120, because every chair matters and so does the order. If only 3 of the 5 will sit, it is P(5, 3) = 5! / 2! = 120 / 2 = 60.
A combination counts selections where order does not matter, and it divides out the orderings you don't care about:
C(n, r) = n! / (r! × (n − r)!)
Pick a 5-card hand from a 52-card deck and the count is C(52, 5) = 52! / (5! × 47!) = 2,598,960. Both formulas are factorials over factorials, which is why a fast, exact factorial is the quiet engine behind every "how many ways" problem. If you would rather skip the manual division, a dedicated combination and permutation calculator plugs your n and r straight into these formulas.
Where Factorials Meet Probability
Once you can count arrangements, probability follows close behind, because most discrete probabilities are a count of favorable outcomes divided by a count of total outcomes, and both counts often involve factorials.
Take the birthday problem. The chance that 23 people all have different birthdays uses a permutation of 365 days, and the number of ways to deal a specific bridge or poker hand leans on combinations. The binomial coefficient C(n, r) is the same combination formula, and it drives the binomial distribution that models coin flips, defect rates, and A/B test outcomes. Even the constant e and the normal distribution trace back, through Taylor series and Stirling's approximation, to sums and ratios of factorials.
The practical catch is scale. The numerator and denominator in these expressions can each be enormous long before their ratio settles into a sane probability. C(52, 5) is under three million, but 52! on its own has 68 digits. That is the everyday reason I keep an exact big-integer factorial open while working through any counting problem: I want the intermediate values to be correct, not approximately correct, before I divide.
A Few Things to Watch For
I have lost more time than I would like to two small confusions, so they are worth naming. The first is the double factorial, written n!!, which multiplies every second term: 7!! = 7 × 5 × 3 × 1 = 105. It is one operation on alternating integers, not the factorial of a factorial — (7!)! would be the factorial of 5,040, a number with thousands of digits. The second is forgetting the domain. A plain factorial is defined only for non-negative integers, so −3 or 2.5 simply has no factorial here (extending it to fractions needs the gamma function, which is a different tool entirely).
The headline to carry away is that the factorial is a tiny definition with an outsized reach. It is nothing more than "multiply down to 1," yet it sets the speed limit on counting, anchors permutations and combinations, and quietly underwrites a large slice of probability. Compute a few by hand, watch 10! land on 3,628,800, and the growth stops being abstract.
Made by Toolora · Updated 2026-06-13