Purpose
Return value
Syntax
=FACT(number)
- number - The number to get the factorial of.
Using the FACT function
The Excel FACT function returns the factorial of a given number. In mathematics, the factorial of a non-negative integer n is the product of all positive integers less than or equal to n , represented with the syntax n!
FACT takes just one argument , number , which should be a positive integer. If number is not an integer, the decimal portion of number will be removed before the factorial is calculated.
Examples
=FACT(3) // returns 6
=FACT(4) // returns 24
=FACT(5) // returns 120
If number is not an integer it will be truncated to an integer:
=FACT(3.2) // returns 6
When number is zero, FACT returns 1:
=FACT(0) // returns 1
If number is negative, FACT returns the #NUM! error:
=FACT(-3) // returns #NUM!
Notes
- Number cannot be negative or FACT will return the #NUM error.
- If number is not an integer it will be truncated to an integer, then solved.
Purpose
Return value
Syntax
=FACTDOUBLE(number)
- number - A number greater than or equal to -1.
Using the FACTDOUBLE function
The FACTDOUBLE function returns the double factorial of a number. A double factorial is calculated differently for even and odd numbers. For an even number, n , it’s the product of all even integers less than or equal to n and greater than or equal to 2. For an odd number, the double factorial is the product of all odd integers less than or equal to n and greater than or equal to 1. The double factorial for both zero and -1 are defined as 1. For numbers less than -1, a double factorial is not defined.
FACTDOUBLE takes just one argument , number , which should be a positive integer. If number is not an integer, the decimal portion of number will be removed before the factorial is calculated.
Examples
For even numbers, the double factorial is the product of all even integers less than or equal to number and greater than or equal to 2. For example, the double factorial of 8 is 384:
=FACTDOUBLE(8)
=8*6*4*2
=384
For odd numbers, the double factorial is the product of all odd integers less than or equal to number and greater than or equal to 1. The double factorial of 7 is 105:
=FACTDOUBLE(7)
=7*5*3*1
=105
The double factorial for zero and -1 are defined as 1:
=FACTDOUBLE(0) // returns 1
=FACTDOUBLE(-1) // returns 1
Notes
- If number is negative, FACTDOUBLE will return the #NUM! error.
- If number is not an integer it will be truncated to an integer, and then solved.
- If number is not numeric, FACTDOUBLE will return the #VALUE! error.