math

Factorial

The product of all positive integers up to n, written as n! (e.g., 5! = 5×4×3×2×1 = 120).

Last updated: · Reviewed by Marcus Webb

The factorial of a non-negative integer n is the product n × (n−1) × (n−2) × ... × 1. By convention, 0! = 1.

Common Values

1!=1, 2!=2, 3!=6, 4!=24, 5!=120, 6!=720, 7!=5040, 10!=3,628,800, 20!=2.43×10¹⁸

Uses

  • Permutations: nPr = n!/(n−r)!
  • Combinations: nCr = n!/[r!(n−r)!]
  • Probability: Counting arrangements and outcomes
  • Taylor series: e^x = Σ(x^n/n!)

Why Factorials Grow So Fast

Factorial growth outpaces exponential growth for large enough n — 20! is already over 2 quintillion, and 100! has 158 digits, far exceeding the number of atoms in the observable universe (~10⁸²). This explosive growth is exactly why brute-force approaches to problems like the traveling salesman problem become computationally impossible past a small number of items.

Stirling's Approximation

For very large n, computing n! exactly becomes impractical, so mathematicians use Stirling's approximation: n! ≈ √(2πn) × (n/e)ⁿ. It's remarkably accurate even for moderately sized n and is widely used in statistics and physics where exact factorials of large numbers would otherwise be needed.

Related Calculators

Related Terms

M

Marcus Webb

Verified Author

Engineering & Applied Mathematics Specialist

Marcus specializes in structural analysis, fluid mechanics, and construction calculations, verifying every formula against ASCE standards, ACI codes, and published engineering handbooks. Content lead at CalculatorApp.me.

Engineering CalculationsApplied MathematicsConstruction & MaterialsFluid MechanicsStatistical Analysis