What is Stirling's Approximation?

n! ≈ √(2πn) · (n/e)ⁿ
Relative error < 1/(12n). Discovered by de Moivre and Stirling independently in 1730.

Stirling's approximation says that for large n, n! ≈ √(2πn) · (n/e)ⁿ. The appearance of both π and e in a formula about counting permutations is striking. For n = 10 the error is under 1%. For n = 100 it is under 0.1%. The formula improves without bound as n grows.

Stirling approximation: relative error rapidly → 0
5.9e-30.030.050.08relative errornerror

The relative error |n! − Stirling(n)| / n! falls below 1% at n = 8 and below 0.1% at n = 80. For large n, Stirling is essentially exact.

Abraham de Moivre found in 1730 that n! ≈ C·√n·(n/e)ⁿ for some constant C. James Stirling identified C = √(2π) the same year. The √(2π) arises from the Gaussian integral: when deriving Stirling via the Gamma function, the integral ∫e^(-t²)dt = √π appears, carrying π into the formula.

Stirling's formula: logarithmic form
ln(n!) ≈ n·ln(n) − n + ½·ln(2πn)
Equivalent: n! ≈ √(2πn) · (n/e)ⁿ
Relative error → 0 as n → ∞. Exact for all practical purposes when n ≥ 20.

The logarithmic form is used throughout physics: in statistical mechanics, Boltzmann's entropy formula S = k·ln(W) requires ln(N!) for huge N (moles of particles). Stirling gives ln(N!) ≈ N·ln(N) - N, making it tractable. The full asymptotic series adds corrections: n! = √(2πn)(n/e)ⁿ · exp(1/(12n) - 1/(360n³) + ⋯)

log(n!) grows exactly as Stirling predicts
4.348.6800.3010.7781.382.0792.8573.7024.6065.566.567.6018.68123456789101112

On a log scale, n! and Stirlings approximation are visually identical. Relative error approaches 0 as n grows.

Related topics
Gamma E Prime Number Theorem
Used in
Mathematics
Physics
🧬Biology
💻Computer Sci
📊Statistics
Chemistry
Engineering
📈Finance
🎨Art
🏛Architecture
Music
🔐Cryptography
🌌Astronomy
🦉Philosophy
🗺Geography
🌿Ecology
Want to test your knowledge?
Question
What is the full asymptotic series for n!?
tap · space
1 / 10