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.

Accuracy of Stirling's approximation
1 7.79% 2 4.05% 3 2.73% 5 1.65% 10 0.83% 20 50 100 n (in n!) Relative error of Stirling's formula: shrinks rapidly toward zero 1%

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.

The logarithmic form: most useful in practice
ln(n!) ≈ n·ln(n) - n + ½·ln(2πn) For n=100: ≈ 460.517 - 100 + 3.225 = 363.74 so 100! ≈ 10^(363.74÷2.303) ≈ 10^157.97

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: the curves are identical
n log n=5: 120 n=9 n=13 1 5 9 13 log(n!) exact Stirling approx

Plotted on a log scale, the exact factorial (blue) and the Stirling approximation (red dashed) are indistinguishable past n=5. The factorial grows super-exponentially, far faster than any exponential, and Stirling captures this growth precisely.

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 relative error of Stirling's approximation?
tap · space
1 / 10