Ad Space — Top Banner

Factorial Formula

Calculate n factorial (n!) — the product of all positive integers from 1 to n.
Used in permutations, combinations, and probability.

The Formula

n! = n × (n - 1) × (n - 2) × ... × 2 × 1

The factorial of a number n is the product of all positive integers from 1 up to n.

By definition, 0! = 1.

Variables

SymbolMeaning
nA non-negative integer
n!n factorial — the product of all integers from 1 to n

Common Factorial Values

  • 0! = 1 (by definition)
  • 1! = 1
  • 2! = 2
  • 3! = 6
  • 4! = 24
  • 5! = 120
  • 6! = 720
  • 7! = 5,040
  • 10! = 3,628,800

Example 1

Calculate 6!

6! = 6 × 5 × 4 × 3 × 2 × 1

6! = 30 × 4 × 3 × 2 × 1 = 120 × 3 × 2 × 1 = 360 × 2 × 1

6! = 720

Example 2

Simplify 8! / 6!

8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1

6! = 6 × 5 × 4 × 3 × 2 × 1

8! / 6! = (8 × 7 × 6!) / 6! = 8 × 7

8! / 6! = 56

When to Use It

Use the factorial formula when:

  • Counting the number of ways to arrange items in order (permutations)
  • Calculating combinations and probability
  • Working with the binomial theorem
  • Solving counting problems in combinatorics

Key Notes

  • Definition: n! = n × (n−1) × (n−2) × … × 1: For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. The special case 0! = 1 is defined by convention — it ensures that combinatorial formulas C(n, 0) = 1 and C(n, n) = 1 work correctly.
  • Superexponential growth: Factorials grow faster than any exponential. 10! = 3,628,800; 20! ≈ 2.4 × 10¹⁸; 52! (card deck arrangements) ≈ 8 × 10⁶⁷ — vastly larger than the number of atoms in the observable universe.
  • Stirling's approximation: n! ≈ √(2πn) × (n/e)^n: Essential when n is too large for direct computation. For n = 100: log₁₀(100!) ≈ 157.97. The approximation is accurate to within 1% for n ≥ 10.
  • Building block of combinatorics: Combinations C(n,k) = n! / [k!(n−k)!] count selections where order doesn't matter. Permutations P(n,k) = n! / (n−k)! count ordered arrangements. Both are derived directly from factorial counting of arrangements.
  • Applications: Factorials appear in Taylor series coefficients (e.g., e^x = Σ xⁿ/n!), probability distributions (binomial, Poisson), counting algorithms, and cryptography (estimating brute-force complexity of permutation ciphers).

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.