FACT function
Returns the factorial of a number (n! = 1 × 2 × … × n), the count of ways to order n items.
Available in All versions of Excel, Excel for the web, Excel for Mac
In every Excel versionWorks in Google Sheets
Syntax
FACT(number)| Argument | What it means | |
|---|---|---|
number | Required | A number from 0 to 170. Decimals are truncated. |
Returns: n!, a whole number (FACT(0) = 1).
How FACT works
FACT multiplies all whole numbers from 1 up to the given number: 5! = 1 × 2 × 3 × 4 × 5 = 120. A factorial counts the number of different orders in which you can arrange n distinct things, such as products on a shelf, speakers in a programme or stops on a route, and it is the building block of COMBIN, PERMUT and probability formulas.
Factorials grow extremely fast: 10! is already 3,628,800 and 170! is the largest Excel can hold (about 7.26E+306). Larger values, and negative numbers, return #NUM!. A non-integer argument is truncated, so FACT(3.7) is 3! = 6. By definition 0! is 1.
Examples
1Ways to arrange products on a shelf
| A | B | C | |
|---|---|---|---|
| 1 | Display | Products | |
| 2 | Front shelf | 5 | 120 |
Result: 120
5 different products can be arranged in 120 orders.
2Delivery routes through 8 stops
| A | B | C | |
|---|---|---|---|
| 1 | Route | Stops | |
| 2 | Van 3 | 8 | 40,320 |
Result: 40,320
40,320 possible orders, which shows why route planning needs smart algorithms rather than trying every option.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#NUM! | The number is negative or greater than 170. | Use GAMMALN for logarithms of huge factorials. |
Tips
- Decimals are cut: FACT(3.7) = 6.
=FACT(n)/FACT(n-k)is the same as PERMUT(n, k).
Google Sheets
FACT also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
FACT in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | FAKTORIÁL |
| Danish | FAKULTET |
| Dutch | FACULTEIT |
| Finnish | KERTOMA |
| German | FAKULTÄT |
| Hungarian | FAKT |
| Italian | FATTORIALE |
| Norwegian (Bokmål) | FAKULTET |
| Polish | SILNIA |
| Portuguese (Brazil) | FATORIAL |
| Portuguese (Portugal) | FATORIAL |
| Russian | ФАКТР |
| Swedish | FAKULTET |
| Turkish | ÇARPINIM |