The factorial of n (written n!) is the product of all positive integers from 1 to n: 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely rapidly — 20! is 2,432,902,008,176,640,000 (18 digits) and 100! has 158 digits. This calculator uses JavaScript BigInt to compute exact results without floating-point overflow, handling inputs up to several hundred.
Factorials are the foundation of combinatorics. The number of ways to arrange n distinct items is n! (permutations). Combinations (choosing r items from n without order) use C(n,r) = n! / (r! × (n−r)!). Factorials appear in Taylor series expansions, the Gamma function, Stirling's approximation, and in probability distributions like the Poisson and binomial. The seemingly simple operation has deep mathematical significance.
By definition, 0! = 1. This is not a convention — it follows from the combinatorial interpretation: there is exactly one way to arrange zero objects (doing nothing).
Extremely fast. 10! = 3,628,800. 20! ≈ 2.4 × 10¹⁸. 100! ≈ 9.3 × 10¹⁵⁷. 1000! has 2,568 digits. Factorial growth is much faster than exponential growth.
For large n, n! ≈ √(2πn) × (n/e)ⁿ. This provides a closed-form approximation that is accurate to within 1% for n ≥ 10 and becomes more accurate as n grows. Useful when you only need the order of magnitude.
Yes — the Gamma function extends factorial to all complex numbers except negative integers: Γ(n) = (n−1)!. So Γ(1.5) = 0.5! ≈ 0.886. This appears in statistics (the Gamma distribution) and physics.
See also the GCD/LCM Calculator, Fraction Calculator, and the Average Calculator.