Britannica Sources used in this answer

Why is 0 factorial defined as 1?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In mathematics, the definition of 0!=1 is not merely an arbitrary convention, but a necessity for consistency across various mathematical formulas and functions.

While the standard definition of a factorial, n!, is the product of all positive integers from 1 to n, this definition does not naturally extend to zero. However, defining 0! as 1 allows for the seamless application of counting formulas in combinatorics. For example, the formula for the number of permutations of n objects taken k at a time is given by:12

nPk=n!(n−k)!

If we wish to calculate the number of ways to arrange all n objects (where k=n), the formula becomes n!/0!. For this to equal n!, 0! must be defined as 1.3

Furthermore, this definition is supported by the gamma function, which generalizes the factorial to non-integral values. The gamma function satisfies the recursive property Γ(x+1)=xΓ(x), and since Γ(1)=1, it follows that 0! corresponds to Γ(1), maintaining mathematical consistency.4