FACT

Calculates the factorial of a non-negative integer, which is the product of all positive integers less than or equal to that number. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1.

Parameter List

Syntax
FACT(number)
number

A non-negative integer to calculate the factorial for. For example: 5, 0, A1. Must be ≥ 0 and ≤ 170.

More details

FACT calculates n! (n factorial) where n is a non-negative integer. The factorial of n is the product of all positive integers from 1 to n. By mathematical convention, 0! = 1. Decimal portions are truncated. Negative numbers return #NUM! error. The maximum value is 170! due to floating-point precision limits.

Examples

FACT() returns 1