The FACT function in Excel is a mathematical function that calculates the factorial of a non-negative integer. The factorial of a number is the product of all positive integers up to that number. This function is particularly useful in statistical and combinatorial calculations, where understanding permutations and combinations is essential.
Syntax
FACT(number)
- number: A non-negative integer for which the factorial is to be calculated. Must be an integer greater than or equal to 0.
Example #1
FACT(5)
This function calculates the factorial of 5, which is 5 × 4 × 3 × 2 × 1 = 120. Result: 120.
Example #2
FACT(0)
This function calculates the factorial of 0. By definition, the factorial of 0 is 1. Result: 1.
Example #3
FACT(3)
This function calculates the factorial of 3, which is 3 × 2 × 1 = 6. Result: 6.
Error handling
- NUM! This error occurs if the provided number is negative or a non-integer value. For example,
FACT(-1)
will result in a NUM! error. - VALUE! This error occurs if the argument is not a valid number. For instance,
FACT("text")
results in a VALUE! error because the input is not a number.