How can we help you?

The FACT function returns the factorial of a number.

The factorial of a number is the product of all positive integers from 1 to that number.

 

Syntax

FACT(value)

Argument

Description

Permitted values

value

A number or a reference to a cell containing a number for which the factorial is calculated

Any non-negative number, formula, or reference to a cell containing a number

 

Examples of use

Calculating the factorial of 5

=FACT(5)

Result: 120, since 5! = 5×4×3×2×1.

Calculating the factorial of -1

=FACT(-1)

Result: #NUM! error, because factorial is undefined for negative numbers.

Calculating the factorial of 0

=FACT(0)

Result: 1, since the factorial of zero is defined as 1.

 

Notes

If the argument is not an integer, it is truncated to an integer (the fractional part is discarded).

The factorial of a non-negative integer n is defined as: n! = n × (n−1) × (n−2) × ... × 1.

Exception: 0!=1.

The FACT function returns the #NUM! error if the argument is a negative number.

The FACT function returns the #NUM! error if the argument is greater than 170 (the calculation result is greater than the maximum possible value).

Was this helpful?
Yes
No
Next
FACTDOUBLE