← Back to Blog

Factorial Calculator: What n! Means and Why It Grows So Fast

Understand factorials, how they relate to permutations and combinations, Stirling's approximation for large values, and where factorials appear in probability.

Factorial Calculator: What n! Means and Why It Grows So Fast

Factorials: n! and Its Explosive Growth

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n. Factorials are the building block of combinatorics — counting arrangements, combinations, and probabilities.

Definition

n! = n × (n−1) × (n−2) × ... × 2 × 1
0! = 1 (by definition)
1! = 1 | 2! = 2 | 3! = 6 | 4! = 24 | 5! = 120
6! = 720 | 7! = 5,040 | 10! = 3,628,800
20! ≈ 2.43 × 10¹⁸

Why 0! = 1

There is exactly one way to arrange zero objects (do nothing). This preserves the recursive relationship n! = n × (n−1)! and makes combinatorial formulas work correctly.

Permutations and Combinations

Permutations (order matters):   P(n,r) = n! ÷ (n−r)!
Combinations (order irrelevant): C(n,r) = n! ÷ [r!(n−r)!]

Example: Choose 3 from 5:
P(5,3) = 120 ÷ 2 = 60
C(5,3) = 120 ÷ (6×2) = 10

Stirling's Approximation (Large n)

n! ≈ √(2πn) × (n/e)ⁿ
100! ≈ 9.33 × 10¹⁵⁷

Calculate factorials: Free Factorial Calculator

Factorial Values

  • 0! = 1 (by definition)
  • 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120
  • 6! = 720, 7! = 5,040, 8! = 40,320, 9! = 362,880
  • 10! = 3,628,800, 12! = 479,001,600, 15! ≈ 1.307 × 10¹²
  • 20! ≈ 2.432 × 10¹⁸, 52! ≈ 8.066 × 10⁶⁷ (card shuffles)

Applications in Counting

Factorials are the foundation of combinatorics — the mathematics of counting arrangements and selections. Permutations (ordered arrangements): P(n,r) = n!/(n-r)! counts ways to choose r items from n in order. Combinations (unordered selections): C(n,r) = n!/(r!(n-r)!) counts ways to choose r from n without regard to order. Example: choosing a 5-card poker hand from a 52-card deck = C(52,5) = 52!/(5!·47!) = 2,598,960 possible hands. The number of ways to shuffle a standard deck is 52! ≈ 8 × 10⁶⁷ — more than the estimated number of atoms in the observable universe.

Frequently Asked Questions

Why is 0! = 1?

There is exactly one way to arrange zero objects: do nothing. This is the empty arrangement. Defining 0! = 1 also ensures that combination formulas work correctly: C(n,0) = n!/(0!·n!) = 1, meaning there is exactly one way to choose nothing from a set — which is true. Without this definition, many formulas in combinatorics would require special cases.

How fast do factorials grow?

Extremely fast — faster than any polynomial or exponential function. 13! already exceeds one billion (6.2 × 10⁹). 21! exceeds the number of seconds since the Big Bang. For large n, Stirling's approximation provides a practical estimate: n! ≈ √(2πn) × (n/e)ⁿ.

Are factorials defined for non-integers?

Yes, through the Gamma function: Γ(n) = (n-1)! for positive integers, but Γ is defined for all positive real numbers. For example, Γ(1/2) = √π, which means (-1/2)! = √π. This generalisation is used in probability distributions (gamma distribution, chi-squared distribution) and in advanced integration.