# Documentation/Calc Functions/FACT

Other languages:

FACT

Mathematical

## Summary:

Calculates the factorial of a non-negative integer (denoted by n!).

FACT(Number)

## Returns:

Returns a positive integer that is the factorial of the given argument.

## Arguments:

Number is a non-negative integer, or a reference to the cell containing that number, that is the value for which the factorial is to be calculated.

• If Number is non-numeric, then FACT reports a #VALUE! error.
• If Number is a non-integer value, then FACT converts it to an integer by taking its floor value.
• If Number is less than 0, then FACT reports an invalid argument error (Err:502).
• If Number is greater than 170, then FACT reports a #VALUE! error. (170! is a very large number, approximately 7.26 E+306)

• The formula for the factorial of a positive integer n is:

$\displaystyle{ \text{FACT}(n)~=~n\times(n-1)\times(n-2)\times...\times\:1 }$

• FACT(0) and FACT(1) are both equal to 1.

## Examples:

Formula Description Returns
=FACT(3.5) The floor value of 3.5 is 3 and 3! is equal to 3*2*1. 6
=FACT(D1) where cell D1 contains the number 1. 1! is equal to 1. 1
=FACT(0) 0! is defined to be 1. 1

FACT