Math & trig function

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)
ArgumentWhat it means
numberRequiredA 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

C2fx=FACT(B2)
ABC
1DisplayProducts
2Front shelf5120

Result: 120

5 different products can be arranged in 120 orders.

2Delivery routes through 8 stops

C2fx=FACT(B2)
ABC
1RouteStops
2Van 3840,320

Result: 40,320

40,320 possible orders, which shows why route planning needs smart algorithms rather than trying every option.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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.

LanguageFunction name
CzechFAKTORIÁL
DanishFAKULTET
DutchFACULTEIT
FinnishKERTOMA
GermanFAKULTÄT
HungarianFAKT
ItalianFATTORIALE
Norwegian (Bokmål)FAKULTET
PolishSILNIA
Portuguese (Brazil)FATORIAL
Portuguese (Portugal)FATORIAL
RussianФАКТР
SwedishFAKULTET
TurkishÇARPINIM