The factorial of a non-negative integer n, written as n!, is the product of all positive integers less than or equal to n. So 5! = 5 x 4 x 3 x 2 x 1 = 120. By convention, 0! = 1. Factorials grow extremely rapidly: 10! = 3,628,800, 15! = 1,307,674,368,000, and 20! exceeds 2.4 quintillion. Factorials are fundamental in combinatorics for counting permutations and combinations, in probability theory, in Taylor series expansions in calculus, and in the Gamma function which extends factorials to non-integers.
Key properties include: n! = n x (n-1)! (recursive definition), 0! = 1 (by convention), n! / (n-k)! = P(n,k) (permutations), and n! / (k! x (n-k)!) = C(n,k) (combinations). Stirling's approximation estimates large factorials: n! is approximately sqrt(2*pi*n) x (n/e)^n.
Enter a non-negative integer and click Calculate. The result shows the factorial value, the number of digits in the result, and the step-by-step multiplication. For large numbers (above 20), results are shown in scientific notation since they exceed standard number display capacity.
By convention and mathematical consistency. There is exactly one way to arrange zero objects (do nothing). It also makes formulas like C(n,0) = n!/0!n! = 1 work correctly.
Extremely fast. 10! = 3.6 million, 20! = 2.4 quintillion, 100! has 158 digits. Factorials grow faster than exponential functions for large n.
Counting arrangements (how many ways to seat 8 people = 8! = 40,320), probability calculations, combinations in lottery odds, and statistical distributions all use factorials.