I was kind of a math nerd in school and the sections about probability and permutation/combination were among my favorites.

I remember spending a lot of time calculating factorials as a part of the probability calculations.

But if you’re using Excel and somehow get into a situation where you need to calculate factorial, you don’t need to take out your pen and paper – a simple Excel formula would do that for you.

## What is a Factorial?

*If you already know this and are here just to know how to calculate it in Excel, jump to the next section.*

In mathematics, the factorial of a number is the result you get when you multiply that same number with all the integers after it till 1.

For example, the factorial of 5 would be 120 (5*4*3*2*1).

A factorial is written as the number after an exclamation sign after it. So the factorial of 5 would be written as 5! (and the value of this would be 120).

## Calculating Factorial in Excel Using the FACT Function

Excel has the in-built FACT function that can be used to calculate the factorial of any number.

=FACT(number)

The FACT function only takes one argument, which is the number for which you want to get the factorial value.

Below is the formula that will give you the factorial of 5.

=FACT(5)

The argument in the FACT function needs to be an integer.

In case you enter the number that has an integer as well as the decimal part to it, the formula would only consider the integer part.

For example, the result of =FACT(5) and =FACT(5.6) would be the same.

Also, you cannot use a negative number as an argument inside the FACT function. if you do, it will give you the #NUM! error

In case you 0 as the argument in the FACT function, it will give you 1.

## Examples of Using the FACT function

Let me quickly show you an example where calculating factorial might be required (right out of my school math textbook)

Let’s say I have 5 different colored balls with me, and I want to find out how many pairs of different colored balls I can make (where the order of the colors matter, Red and Green would be different than Green and Red).

The mathematical formula to do this would be =5!/2!

And in Excel, you can use the below formula:

=FACT(5)/FACT(2)

*In case you want to calculate unique combinations in Excel, you can use the COMBIN formula*.

So this is how you can easily calculate factorial in Excel.

I hope you found this formula tutorial useful!

**Other Excel tutorials you may also like:**