Why $0! = 1$ (and not 0, like everyone first thinks)

The first time anyone tells you that $0! = 1$, the natural reaction is to assume they have got it backwards. $0$ multiplied by anything is $0$. $0$ apples means no apples. So $0!$ should obviously be $0$, right?

It isn’t. $0!$ is $1$, by definition, and the definition is not arbitrary — there are several independent reasons why $1$ is the only sensible value, and they all converge on the same answer. This post is the four reasons, in increasing order of how much they will convince you.

Reason 1: the recursion forces it

The factorial function is defined recursively as

$$n! = n \times (n-1)!$$

with $1! = 1$ as the starting point. So $5! = 5 \times 4!$, $4! = 4 \times 3!$, and so on down to $1! = 1$. The recursion walks the values down by one each step.

What if we extend the recursion downward, to $n = 1$? It says:

$$1! = 1 \times 0!$$

We know $1! = 1$. So $0!$ has to equal $1$. There is no other value that makes the recursion consistent.

This is the proof you usually see, and it is correct, but it feels like an algebraic accident. The next reason is more satisfying.

Reason 2: the pattern

Watch what happens to factorials when you go down. Each step divides by the next integer:

nn!
5120
424
36
22
11
0?

The pattern is “divide by the previous $n$ as you step down.” $120 / 5 = 24$. $24 / 4 = 6$. $6 / 3 = 2$. $2 / 2 = 1$. $1 / 1 = 1$. The next step gives $0! = 1$. Continuing this pattern further would require dividing by $0$, which breaks down — which is why $(-1)!$ is undefined and the factorial cannot be extended to negative integers using the same trick.

Reason 3: counting arrangements

The combinatorial meaning of $n!$ is “the number of ways to arrange $n$ distinct objects in a row.” For $n = 3$ with objects A, B, C, the six arrangements are

$$\text{ABC, ACB, BAC, BCA, CAB, CBA},$$

which matches $3! = 6$.

For $n = 0$, the question is: how many ways are there to arrange zero objects in a row? At first this sounds like a trick question, and the intuitive answer is “zero, because there is nothing to arrange.” But that is the wrong intuition, because we are counting arrangements, not objects.

There is exactly one arrangement of zero objects: the empty arrangement. It is a perfectly valid arrangement — we just happen to have nothing in it. The same way there is exactly one empty set, there is exactly one empty sequence. So the number of arrangements of zero objects is $1$, not $0$.

This is the explanation that I find most satisfying. It tells you why the recursion gives $1$ and not $0$ — not because the algebra forces it but because it is genuinely the right count.

Reason 4: the binomial coefficient

The binomial coefficient $\binom{n}{k}$ counts the number of ways to choose $k$ items from a set of $n$. It is defined as

$$\binom{n}{k} = \frac{n!}{k!\,(n-k)!}.$$

For this to be consistent at the edges, we need $\binom{n}{0} = 1$ and $\binom{n}{n} = 1$ for all $n$. Why $1$? Because there is exactly one way to choose zero items from a set (don’t pick anything), and exactly one way to choose all $n$ items (pick all of them).

But $\binom{n}{0} = \dfrac{n!}{0!\,n!}$. For this to equal $1$, we need $0! = 1$. The same logic falls out of $\binom{n}{n} = \dfrac{n!}{n!\,0!} = 1$. The convention $0! = 1$ is what makes the binomial-coefficient formula work at the boundaries without needing a special case.

The same applies in calculus, where the Taylor series for a function $f$ at $a$ is written

$$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n.$$

The $n = 0$ term is $\frac{f(a)}{0!}(x - a)^0$. We want that to be just $f(a)$ (the value of the function at $a$). Both $0! = 1$ and $(x - a)^0 = 1$ are needed for the formula to work cleanly without a special case for $n = 0$.

The same pattern shows up everywhere

The reason $0! = 1$ keeps coming out of unrelated places — the recursion, the combinatorial count, the binomial coefficient, the Taylor series — is that mathematics has a strong preference for definitions that make formulas work at boundary cases without needing exceptions. “The empty product is $1$” is the general principle here, in the same way that “the empty sum is $0$” is the general principle for addition.

Think about it this way. If you multiply no numbers together, what should you get? You should get the multiplicative identity, the number that doesn’t change anything when you multiply by it. That number is $1$. Similarly, if you add no numbers together, you should get the additive identity, which is $0$. Mathematicians have strong reasons to make “the empty version” of any operation equal to that operation’s identity element. $0! = 1$ is the empty-product version of the factorial.

What about $(-1)!$ and the gamma function?

You might think the same line of reasoning extends downward to $(-1)!$ and beyond, but it does not. The recursion $n! = n \cdot (n-1)!$ gives $0! = 0 \cdot (-1)!$, which would force $(-1)! = \tfrac{0!}{0}$ — division by zero, which is undefined.

However, there is a beautiful generalisation of the factorial to non-integer values, called the gamma function, written $\Gamma(n)$. It is defined by an integral, satisfies $\Gamma(n) = (n-1)!$ for positive integers, and is finite for almost all real and complex numbers (including the half-integers, where $\Gamma(\tfrac{1}{2}) = \sqrt{\pi}$, which is a striking fact in its own right). The gamma function is undefined at $0, -1, -2, -3, \ldots$, which corresponds exactly to the “factorial of negative integers is undefined” rule.

The gamma function is one of those mathematical objects that turns up unexpectedly in probability, statistics, and quantum field theory. But the bottom line for school maths is: factorials are defined for non-negative integers, $0! = 1$, and negatives are off the table unless you go to graduate school.

One last sanity check

Plug $n = 0$ into the binomial-coefficient formula: $\binom{0}{0} = \dfrac{0!}{0! \cdot 0!}$. If we set $0! = 1$, this gives $\binom{0}{0} = 1$, which is exactly right: there is one way to choose zero items from a set of zero items (the empty choice). If we had set $0! = 0$, the formula would give $\dfrac{0}{0}$, which is undefined. The convention pays off again.

$0! = 1$ is one of those definitions that initially feels arbitrary and turns out, on inspection, to be the only choice that makes everything else consistent. Mathematics is full of these moments — they are part of why the subject is so internally coherent.


Read next