Skip to main content

FACT function

Factorial function. FACT(n) returns the factorial of n. The factorial of a number n, n!, is equal to 1*2*3*…*n.

Factorial function$$ n! = \prod_{k=1}^n k $$

If the argument n is not an integer, it is truncated.

The argument n cannot be negative.

If n is larger than 170, the function overflows and returns an error (consider using the GammaLn function for calculations).

The argument n can be a real number or a matrix. When it is a matrix, the function returns a matrix with the same dimensions and with the FACT function applied to all elements.

Example

FACT(5) equals 120 (=1*2*3*4*5)

Calculator

FACT 6

Graph

FACT function

See also

External links