The symbol n! (read “n factorial”) means you multiply a whole number by every positive whole number below it. So 5! = 5 × 4 × 3 × 2 × 1 = 120. It shows up constantly in statistics because so many probability calculations depend on counting the number of ways things can be arranged or selected.
How to Calculate a Factorial
The formula is straightforward: n! equals the product of all positive integers from 1 up to n. A few quick examples make this concrete:
- 3! = 3 × 2 × 1 = 6
- 5! = 5 × 4 × 3 × 2 × 1 = 120
- 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
- 10! = 3,628,800
Notice how fast these numbers grow. Going from 5! to 10! jumps the result from 120 to over 3.6 million. By the time you reach 20!, you’re at roughly 2.4 quintillion. This explosive growth is part of why factorials matter in statistics: even modest-sized groups produce enormous numbers of possible arrangements.
Why 0! Equals 1
This trips up nearly everyone at first, but 0! is defined as 1. It’s not a proof you derive so much as a definition mathematicians chose because it makes every other formula work correctly. Consider a simple case: if you have n items and want to know how many ways to arrange all n of them, the permutation formula gives n! ÷ (n − n)!, which simplifies to n! ÷ 0!. You already know intuitively that n items can be arranged in n! ways. For the formula to give the right answer, 0! has to equal 1.
There’s also a logical way to think about it. How many ways can you arrange a collection of zero objects? Exactly one way: you do nothing. That single empty arrangement is why 0! = 1.
Counting Arrangements: Permutations
A permutation is an ordered arrangement, where the sequence matters. If you’re picking r items from a group of n and care about the order they’re in, the number of possible permutations is:
P(n, r) = n! ÷ (n − r)!
Say you have 10 runners in a race and want to know how many different ways the gold, silver, and bronze medals could be awarded. That’s P(10, 3) = 10! ÷ 7! = 10 × 9 × 8 = 720 possible outcomes. The factorial in the numerator captures all possible arrangements of the full group, and dividing by (n − r)! removes the arrangements of the runners you didn’t select.
Counting Selections: Combinations
A combination is a selection where order doesn’t matter. Picking players A, B, and C for a team is the same as picking C, A, and B. The formula is:
C(n, r) = n! ÷ [r! × (n − r)!]
This is the same as the permutation formula, but with an extra r! in the denominator that eliminates duplicate orderings. If you’re choosing 3 people from a group of 10 for a committee (where no one has a special role), you get 10! ÷ (3! × 7!) = 120 possible committees. That’s much smaller than the 720 permutations because order no longer matters.
This expression, n! ÷ [r! × (n − r)!], is called the binomial coefficient. You’ll see it written as “n choose r,” and it’s one of the most common places factorials appear in statistics.
Factorials in Probability Distributions
Two of the most widely used probability distributions rely directly on factorials.
Binomial Distribution
The binomial distribution calculates the probability of getting exactly x successes in n independent trials, each with the same probability p of success. The formula is:
P(x) = [n! ÷ (x! × (n − x)!)] × p^x × (1 − p)^(n − x)
The factorial portion at the front is the binomial coefficient. It counts how many different sequences of successes and failures could produce exactly x successes. For example, if you flip a coin 10 times, the factorial term tells you how many distinct patterns of heads and tails give you exactly 6 heads. The rest of the formula multiplies in the actual probability of each pattern occurring.
Poisson Distribution
The Poisson distribution models the probability of a certain number of events happening in a fixed interval of time or space, like the number of customer calls per hour or the number of typos per page. Its formula is:
P(k) = (λ^k × e^(−λ)) ÷ k!
Here, λ is the average number of events you expect, k is the specific count you’re calculating the probability for, and k! sits in the denominator. The factorial acts as a scaling factor that adjusts the probability downward as k gets larger, reflecting the fact that extremely high counts become increasingly unlikely.
How Factorials Scale
Factorials grow faster than exponential functions, which is why they’re so useful for describing the vast number of ways real-world items can be arranged. A standard deck of 52 playing cards can be shuffled into 52! different orders. That number is approximately 8.07 × 10^67, a 68-digit figure so large that every shuffle you’ve ever done almost certainly produced an arrangement that has never existed before in the history of card games.
This rapid growth also creates a practical problem: calculators and computers can overflow when computing large factorials directly. For very large values of n, statisticians and physicists use an approximation known as Stirling’s formula:
n! ≈ √(2πn) × (n/e)^n
This gives a close estimate without requiring you to multiply thousands of numbers together. It’s especially common in statistical mechanics and information theory, where factorials of astronomically large numbers appear routinely.
Factorials Beyond Whole Numbers
The standard factorial only works for non-negative integers: 0, 1, 2, 3, and so on. But some statistical applications need something like a factorial for fractions or decimals. This is where the gamma function comes in. For any positive integer n, the gamma function of n equals (n − 1)!. So gamma(5) = 4! = 24. The useful part is that the gamma function also produces values for non-integers like 3.5 or 0.7, extending the concept of “how many arrangements” into continuous mathematics. You’ll encounter it in distributions like the t-distribution and chi-squared distribution, where the parameters aren’t always whole numbers.

