How to Do Factorial in Excel?

In this blog post, I will explain to you how to do a factorial in Excel.

The easiest way to do factorial that is by using the FACT function. This is the simple function categorized as in the Math&Trig category that will calculate a factorial for any positive number provided. It’s available for all versions of Excel starting from Excel 2000.

The factorial is the mathematical term that multiplies all numbers less than a given number. It can be recognized by an exclamation mark after a number. For example, if I want to get the factorial of the number 4, I will write it as 4! The result is: 4! = 4*3*2*1 = 24.

Calculate Factorial in Excel

As I mentioned, Excel enables users to get the factorial of a selected number using the FACT function. This makes my work much easier because otherwise, I would have to type and multiply all numbers manually.

The syntax of the function is:


The parameter number is any non-negative number.

In the following example, I want to get a factorial for number 5 in cell A2. To do that, I’ll type the following formula:


Excel returns 120 as a result, because 5! = 5*4*3*2*1, which is 120. Now I will copy the formula from cell B2 down the column in order to get a factorial for other numbers in column A.

Now I have factorials for all wanted numbers. The factorial of 0 will always be 1, as shown in row 7.

Also Learn: Use Euler Number in Excel

Possible Errors When Calculating Factorial in Excel

The first possible error when using the FACT function is providing a non-numeric value as a parameter. In the following example I provided “ABC“:

factorial function in Excel

The result in this case is the #VALUE! Error, because the function can’t interpret a text.

Another possible error (#NUM! Error) cause is entering a negative number. Here, I entered -5 as a function parameter:

There are not many ways to calculate factorial in Excel. All you have to do is to use FACT function.

Now, you know how to do factorial in Excel.

Suggested Article: How to Remove Parentheses (Brackets) in Excel?

Leave a Comment