FACT function
FACT returns the factorial of a number, which is all the whole numbers from 1 up to it multiplied together. It is a building block for counting arrangements.
Example
Read it as a sentence: multiply 5 by every whole number below it down to 1, which gives 120.
A
B
C
D
1
120
2
3
Syntax
FACT(number)
-
number(required) - A whole number zero or higher.
Returns: The factorial: 1 x 2 x 3 x ... x number.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=FACT(0.5) | 1 | Positive |
=FACT(0) | 1 | Zero |
=FACT(2) | 2 | Larger value |
=FACT("0.5") | 1 | Text number "0.5" |
=FACT(TRUE) | 1 | TRUE |
=FACT({0.1,0.2}) | 1 | Array constant spills |
=FACT(-0.5) | #NUM! | Negative |
=FACT("abc") | #VALUE! | Non-numeric text |
Watch out for
- Decimals are truncated.
- Negative numbers return #NUM!.
- FACT(0) is 1.
Where it works
- Excel
- FACT is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Math and trig functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .