This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


gives the factorial of n.
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • For non-integer n, the numerical value of n! is given by Gamma.
  • For integers and half integers, Factorial automatically evaluates to exact values.
  • Factorial can be evaluated to arbitrary numerical precision.
Click for copyable input
Click for copyable input
Evaluate for large arguments:
Evaluate for half-integer arguments:
Plot the factorial function:
Evaluate numerically for complex arguments:
Factorial threads element-wise over lists:
Series expansion at infinity (Stirling's approximation):
Series at :
Evaluate to high precision:
The precision of the output tracks the precision of the input:
Infinite arguments give symbolic results:
Factorial allows derivatives:
Make a table of half-integer factorials:
Number of permutations of 6 elements:
Plot of the absolute value of Factorial in the complex plane:
Find the asymptotic expansion of ratios of factorials:
Volume of an -dimensional unit hypersphere:
Low-dimensional cases:
Plot the volume of the unit hypersphere as a function of dimension:
Find the series expansion at -:
Use FullSimplify to simplify expressions involving Factorial:
Compute a generating function sum involving Factorial:
Compute numerical sums involving Factorial:
The generating function is divergent:
Use regularization to obtain a closed-form generating function:
Generating function as a formal series:
Some integrals can be done:
Product of factorials:
Large arguments can give results too large to be computed explicitly, even approximately:
Smaller values work:
Machine-number inputs can give high-precision results:
Find the numbers of digits 0 through 9 in 100000!:
Nested factorials over the complex plane:
Plot Factorial at infinity:
New in 1