What Does an Exclamation Point Mean in Statistics?

In statistics, the exclamation point (!) is the factorial symbol. When you see a number followed by an exclamation point, like 5!, it means you multiply that number by every positive whole number below it down to 1. So 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials show up constantly in statistics because they’re the mathematical engine behind counting arrangements, calculating probabilities, and working with some of the most common probability distributions.

How to Calculate a Factorial

The notation n! (read as “n factorial”) means you take the number n and multiply it by every integer below it until you reach 1. A few examples make this clear:

  • 3! = 3 × 2 × 1 = 6
  • 4! = 4 × 3 × 2 × 1 = 24
  • 5! = 5 × 4 × 3 × 2 × 1 = 120
  • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040

Factorials grow extremely fast. By the time you reach 10!, the result is already 3,628,800. At 20!, you’re looking at a number with 18 digits. This explosive growth reflects what factorials actually measure: the number of possible arrangements gets enormous very quickly as you add more items.

Why 0! Equals 1

One of the most common points of confusion is that 0! is defined as 1, not 0. This seems counterintuitive, but the logic holds up when you think about what a factorial represents. A factorial counts how many ways you can arrange a set of objects. With zero objects, there’s exactly one way to arrange them: you don’t. That single “empty arrangement” still counts, so 0! = 1.

This definition also keeps the math consistent. Many statistical formulas divide by factorials, and if 0! equaled 0, those formulas would break by dividing by zero. Setting 0! = 1 ensures everything works smoothly across probability and combinatorics.

Counting Arrangements and Selections

The most fundamental use of factorials is counting how many ways you can arrange things. If you have 6 books on a shelf, there are 6! = 720 different orders you could place them in. This concept, called a permutation, is where factorials get their start.

When you only want to arrange some items out of a larger group, the permutation formula uses factorials to handle the math: divide n! by (n − r)!, where n is the total number of items and r is how many you’re choosing. If you’re picking 3 books from a shelf of 10 and the order matters, the calculation is 10! ÷ 7! = 720 possible arrangements.

When order doesn’t matter, you’re working with combinations instead. Choosing 3 people from a group of 10 for a committee (where it doesn’t matter who was picked first) uses the formula n! ÷ (r! × (n − r)!). That gives you 10! ÷ (3! × 7!) = 120 possible committees. This combination formula, sometimes written as “n choose r,” is one of the most frequently used tools in statistics, and it’s built entirely on factorials.

Factorials in Probability Distributions

Factorials aren’t just for counting exercises. They’re embedded in the formulas for several probability distributions that statisticians use every day.

The Binomial Distribution

The binomial distribution calculates the probability of getting a specific number of successes in a fixed number of independent trials, like flipping a coin 10 times and asking how likely you are to get exactly 6 heads. The formula multiplies the “n choose r” combination (which uses factorials) by the probability of each outcome. The factorial portion determines how many different sequences could produce that result. Getting 6 heads in 10 flips can happen in 10! ÷ (6! × 4!) = 210 different orderings, and the formula accounts for each one.

The Poisson Distribution

The Poisson distribution models how often events happen in a fixed period of time, like how many customers arrive at a store per hour or how many emails you receive per day. Its formula divides by x!, where x is the number of events you’re calculating the probability for. The factorial in the denominator adjusts for the fact that the order in which events occur doesn’t matter when you’re just counting totals.

The Subfactorial: When ! Comes First

You may occasionally see the exclamation point placed before a number, like !n. This is not a typo. It’s a different operation called the subfactorial, which counts the number of ways to rearrange a set of objects so that no object ends up in its original position. These rearrangements are called derangements.

For example, if three people each put a hat into a pile and then each grab one at random, the subfactorial !3 tells you how many ways everyone could end up with someone else’s hat. It’s a niche concept compared to the standard factorial, but worth knowing exists so you don’t mistake it for a formatting error.

Working With Large Factorials

Because factorials grow so fast, directly calculating them becomes impractical for large numbers. A value like 100! has 158 digits. In fields like physics and data science, where large factorials come up when counting arrangements of particles or files in data compression, scientists use an approximation. The most common one estimates the logarithm of n! as roughly n × log(n) − n, which is accurate enough for practical purposes and avoids dealing with impossibly large numbers.

How to Calculate Factorials in Software

You rarely need to compute factorials by hand. Most statistical tools have built-in functions:

  • Excel: Use =FACT(n). For example, =FACT(5) returns 120.
  • R: Use factorial(n). Typing factorial(4) returns 24, and factorial(0) correctly returns 1.
  • Python: Import the math library, then use math.factorial(n).

These functions handle the edge cases automatically, including returning 1 for 0!. In R, attempting a factorial of a negative number returns NaN (not a number), since factorials are only defined for non-negative integers.