Numbers & Arithmetic

Why Zero Factorial Equals 1

Zero factorial equals 1: 0!=10! = 1. It is the only value that keeps the rule n!=n⋅(n−1)!n! = n \cdot (n-1)! working all the way down to zero, and it matches the fact that a product with no factors equals 1.

n!=n⋅(n−1)!  ⇒  0!=1n! = n \cdot (n-1)! \;\Rightarrow\; 0! = 1

Try it with your numbers

Show every step

The most common wrong guess is 0, because multiplying by zero feels like it should wipe everything out. Nothing is being multiplied by zero here. The factorial of a whole number nn is the product of every whole number from nn down to 1, and for n=0n = 0 that list is empty. The sections below give five independent reasons the answer is 1, show where the rule stops working, and put it to use in real problems.

Why does zero factorial equal 1?

Countdown from 4 factorial to 0 factorial by dividing, ending at 1
Each step down divides by n, and the last step from 1! to 0! divides by 1, so 0! = 1.

Every factorial is built from the one before it:

n!=n⋅(n−1)!n! = n \cdot (n-1)!

For example, 5!=5⋅4!=5⋅24=1205! = 5 \cdot 4! = 5 \cdot 24 = 120. Rearranged, the rule lets you step down by dividing: (n−1)!=n!n(n-1)! = \dfrac{n!}{n}. Start at 4!=244! = 24 and keep going:

3!=244=62!=63=21!=22=10!=11=1\begin{aligned} 3! &= \frac{24}{4} = 6 \\ 2! &= \frac{6}{3} = 2 \\ 1! &= \frac{2}{2} = 1 \\ 0! &= \frac{1}{1} = 1 \end{aligned}

The last line is the one that matters. Put n=1n = 1 in the original rule and you get 1!=1⋅0!1! = 1 \cdot 0!. Since 1!=11! = 1, the only possible value is 0!=10! = 1. Any other choice would break a rule that holds for every other number.

The countdown stops there. The next step would be 0!/00!/0, and dividing by zero is undefined (see dividing integers). That is why negative whole numbers have no factorial, a point that returns in the section on traps.

Quick check

Put n=1n = 1 into n!=n⋅(n−1)!n! = n \cdot (n-1)!. What value of 0!0! does this force?

Zero factorial as an empty product

A factorial is a product, and 0!0! is a product with no factors at all. The convention for an empty product is 1, in the same way that the sum of no numbers is 0. An arithmetic series with zero terms adds up to 0 for that reason: a running total starts at 0 and a running product starts at 1, because those are the values that change nothing.

Here is a way to see it without trusting any convention. Suppose five numbers multiply to a total PP, and you split them between two people, A and B. The total must equal A’s product times B’s product. Give all five numbers to A and none to B, and the equation reads P=P⋅PBP = P \cdot P_B. That works only if B’s empty product is 1. If it were 0, the equation would claim P=0P = 0 for every list of numbers.

This is the identity property of multiplication at work: 1 is the number multiplication leaves alone. The same idea explains why x0=1x^0 = 1, since zero copies of xx multiplied together is again the empty product.

Why 1 and not 0?

A product built one factor at a time has to start at 1, because multiplying by 1 changes nothing. Starting at 0 would turn every factorial into 0.

How many ways can you arrange zero objects?

Factorials count orderings. Three different objects can be lined up in 3!=63! = 6 ways, two in 2!=22! = 2 ways, and one in 1!=11! = 1 way. With zero objects there is exactly one arrangement: the empty one, where nothing is placed. Having no objects is not the same as having no outcome. “Zero ways” would mean arranging nothing is impossible, but you can always do it by doing nothing.

The counts 6, 2, 1, 1 for 3, 2, 1, 0 objects match the countdown from the first section, so the counting argument and the algebra agree. The same logic gives subset counts. From any collection there is one way to choose nothing and one way to choose everything, and the next section turns that into a formula.

Try this: Write out all the orders of the letters A, B, C (there are 6). Then list the orders for A and B, for A alone, and for no letters at all. Count each list and check that you get 6, 2, 1, 1.

Zero factorial in the combination formula

The number of ways to choose rr items from nn is

(nr)=n!r! (n−r)!\binom{n}{r} = \frac{n!}{r!\,(n-r)!}

and 0!0! appears in the denominator at both ends. Choosing none (r=0r = 0) leaves 0!0! in the r!r! slot, and choosing everything (r=nr = n) leaves 0!0! in the (n−r)!(n-r)! slot.

Example 1. Find (50)\binom{5}{0} and (55)\binom{5}{5}.

(50)=5!0! 5!=1201⋅120=1\binom{5}{0} = \frac{5!}{0!\,5!} = \frac{120}{1 \cdot 120} = 1

(55)=5!5! 0!=120120⋅1=1\binom{5}{5} = \frac{5!}{5!\,0!} = \frac{120}{120 \cdot 1} = 1

Both match common sense: one way to pick nobody from five people, one way to pick all five. If 0!0! were 0, both would be divisions by zero, and the formula would fail in its two simplest cases.

Example 2. Check that the choices from a 4-element set add up to all its subsets, 24=162^4 = 16.

(40)+(41)+(42)+(43)+(44)=1+4+6+4+1=16\binom{4}{0} + \binom{4}{1} + \binom{4}{2} + \binom{4}{3} + \binom{4}{4} = 1 + 4 + 6 + 4 + 1 = 16

For instance, (42)=242⋅2=6\binom{4}{2} = \dfrac{24}{2 \cdot 2} = 6. The two 1s at the ends are the empty subset and the full set, and they exist only because 0!=10! = 1.

Quick check

Evaluate (77)\binom{7}{7}.

Zero factorial and the gamma function

For whole numbers a factorial is a product, but a smooth function called the gamma function fills in the gaps between them:

Γ(z)=∫0∞xz−1e−x dx,Γ(n+1)=n!\Gamma(z) = \int_0^\infty x^{z-1} e^{-x}\,dx, \qquad \Gamma(n+1) = n!

Put in n=0n = 0 and the integral can be computed directly:

0!=Γ(1)=∫0∞e−x dx=10! = \Gamma(1) = \int_0^\infty e^{-x}\,dx = 1

No convention is involved here. The value comes out of a calculation, and the gamma function obeys Γ(z+1)=z Γ(z)\Gamma(z+1) = z\,\Gamma(z), the continuous twin of n!=n⋅(n−1)!n! = n \cdot (n-1)!.

A second place where the value is forced is the series for the exponential function:

ex=x00!+x11!+x22!+⋯e^x = \frac{x^0}{0!} + \frac{x^1}{1!} + \frac{x^2}{2!} + \cdots

At x=0x = 0 every term except the first vanishes, and e0=1e^0 = 1, so the first term must equal 1. That requires 0!=10! = 1.

Gamma also assigns factorials to fractions, for example (12)!=Γ ⁣(32)=π2≈0.886\left(\tfrac{1}{2}\right)! = \Gamma\!\left(\tfrac{3}{2}\right) = \dfrac{\sqrt{\pi}}{2} \approx 0.886. This is a reminder that once the input leaves the whole numbers, the output can be an irrational number.

Is 0! equal to 0? Traps and limits of the rule

The trap is reading 0!0! as “zero times something.” The exclamation mark does not mean multiplication by the number in front of it. Keep these facts straight:

  • 0!=10! = 1, not 0, because no multiplication by zero ever happens.
  • 0!0! counts arrangements (one), not objects (zero).
  • 0!=1!=10! = 1! = 1, so two different inputs give the same output.
  • Factorials are defined for whole numbers, so (−1)!(-1)! and every negative integer factorial do not exist.

The third point catches people when solving equations. If n!=1n! = 1, there are two solutions, n=0n = 0 and n=1n = 1, and writing only n=1n = 1 loses a point. The fourth point connects to how numbers are organized: factorials need whole numbers, and stepping below zero leaves that set.

Mental check: 0! and 1! are twins

Both equal 1. When a problem hands you 0!0!, treat it exactly like 1!1! and carry on.

How to simplify expressions with 0!

Factorial acts only on the number directly before the exclamation mark, and it is done before addition and multiplication, following the order of operations. Evaluate each factorial on its own, then combine.

Example 3. Compare 3!+0!3! + 0! with (3+0)!(3+0)!.

3!+0!=6+1=73! + 0! = 6 + 1 = 7

(3+0)!=3!=6(3+0)! = 3! = 6

The two results differ, so factorial does not distribute over addition.

Example 4. Evaluate 0!+1!+2!3!\dfrac{0! + 1! + 2!}{3!}.

0!+1!+2!3!=1+1+23⋅2⋅1=46\frac{0! + 1! + 2!}{3!} = \frac{1 + 1 + 2}{3 \cdot 2 \cdot 1} = \frac{4}{6}

Divide top and bottom by 2 when simplifying the fraction:

46=23\frac{4}{6} = \frac{2}{3}

One more case is worth knowing. The cancellation n!(n−1)!=n\dfrac{n!}{(n-1)!} = n also holds at n=1n = 1, where it reads 1!0!=11=1\dfrac{1!}{0!} = \dfrac{1}{1} = 1. It works there only because 0!=10! = 1, which is why general factorial formulas can be used at the edges without special cases.

Where does zero factorial show up in real life?

Probability is the most common use. For nn independent trials with success chance pp, the chance of exactly kk successes is (nk)pk(1−p)n−k\binom{n}{k} p^k (1-p)^{n-k}. The chance of no heads in 3 fair coin flips uses k=0k = 0:

(30)(12)0(12)3=3!0! 3!⋅1⋅18=18\binom{3}{0}\left(\tfrac{1}{2}\right)^0\left(\tfrac{1}{2}\right)^3 = \frac{3!}{0!\,3!} \cdot 1 \cdot \frac{1}{8} = \frac{1}{8}

Without 0!=10! = 1 the very first factor would be undefined, and the “none” outcome would drop out of every probability table.

Programming relies on it too. A recursive factorial function uses 0 as its base case and returns 1, and a loop that multiplies a running product starts that product at 1. Calculators agree and display 1 for 0!0!. They also show how quickly factorials grow: 20!=2,432,902,008,176,640,000≈2.43×101820! = 2{,}432{,}902{,}008{,}176{,}640{,}000 \approx 2.43 \times 10^{18}, which is where scientific notation becomes the natural way to write the answer.

Quick check

A fair coin is flipped 4 times. What is the probability of getting 0 heads?

How can you check that 0! equals 1 yourself?

When a result feels like a trick, test it from several directions. Four quick tests all land on 1:

  1. Run the countdown 4!→3!→2!→1!→0!4! \to 3! \to 2! \to 1! \to 0! by dividing by 4, 3, 2, 1 in turn.
  2. Count the ways to arrange 2, 1 and 0 objects, and see 2, 1, 1.
  3. Evaluate (n0)=n!0! n!\binom{n}{0} = \dfrac{n!}{0!\,n!} and confirm it must be 1 for the formula to work.
  4. Test n!(n−1)!=n\dfrac{n!}{(n-1)!} = n at n=1n = 1.

Agreement across counting, algebra and calculus is what makes this more than a convention. When you evaluate mixed expressions that contain factorials, finish the factorials first and then apply the usual order. For more practice in sequencing steps correctly, try these order of operations practice problems.

Practice problems

0 of 5 solved

  1. Evaluate 0!+1!0! + 1!.

  2. Evaluate (90)\binom{9}{0}.

  3. Evaluate 2!+0!−(2+0)!2! + 0! - (2+0)!.

  4. Find the whole number nn that solves n!0!=24\dfrac{n!}{0!} = 24.

  5. Evaluate 10!+11!+12!+13!+14!\dfrac{1}{0!} + \dfrac{1}{1!} + \dfrac{1}{2!} + \dfrac{1}{3!} + \dfrac{1}{4!}.

Common questions

What is zero factorial?

Zero factorial is written 0!0! and equals 1. It is the product of no numbers, and 1 is the value that keeps the factorial rule n!=n⋅(n−1)!n! = n \cdot (n-1)! true all the way down.

Why is 0! not equal to 0?

Nothing is being multiplied by zero. A factorial multiplies the whole numbers from nn down to 1, and for n=0n = 0 that list is empty, so the result is the empty product, 1. If 0!0! were 0, formulas like (n0)\binom{n}{0} would require dividing by zero.

Is zero factorial a definition or a proof?

It is a definition, but a forced one. Any value other than 1 would contradict the recurrence 1!=1⋅0!1! = 1 \cdot 0!, the counting rule for arrangements, and the gamma function, which gives Γ(1)=1\Gamma(1) = 1 directly from an integral.

What is the factorial of a negative number?

Negative integers have no factorial. Stepping down from 0!0! would require (−1)!=0!/0(-1)! = 0!/0, which is division by zero. The gamma function also has no value at 0,−1,−2,…0, -1, -2, \dots for the same reason.

Is 0! the same as 1!?

Yes, both equal 1. This means n!=1n! = 1 has two solutions, n=0n = 0 and n=1n = 1, which is an easy point to miss on a test.

Does a calculator give 1 for 0!?

Yes. Scientific calculators and programming languages return 1 for 0!0!, because the product starts at 1 and no factors are applied. Recursive code uses 0 as the base case that returns 1.

Up next