Skip to content
Oakfield Operator Calculus Function Reference Site

Stirling Series

Stirling’s formula gives an asymptotic approximation for the factorial function as nn \to \infty:

n!2πnnnenn! \sim \sqrt{2\pi n}\, n^n e^{-n}

Equivalently, using the Gamma function with n!=Γ(n+1)n! = \Gamma(n+1),

Γ(z)2πzz12ez\Gamma(z) \sim \sqrt{2\pi}\, z^{z-\frac12} e^{-z}

as z|z| \to \infty with argz<π|\arg z| < \pi.


Taking logarithms yields a particularly useful representation:

lnn!=nlnnn+12ln(2πn)+o(1)\ln n! = n\ln n - n + \tfrac12 \ln(2\pi n) + o(1)

This form is central in entropy calculations and information theory.


Stirling’s formula admits a full asymptotic expansion:

n!2πnnnen(1+112n+1288n213951840n3+)n! \sim \sqrt{2\pi n}\, n^n e^{-n} \left( 1 + \frac{1}{12n} + \frac{1}{288n^2} - \frac{139}{51840n^3} + \cdots \right)

The coefficients are expressed in terms of Bernoulli numbers.


Sharper versions provide explicit bounds on the remainder. For example,

2πnn+12en<n!<2πnn+12en+112n\sqrt{2\pi}\, n^{n+\frac12} e^{-n} < n! < \sqrt{2\pi}\, n^{n+\frac12} e^{-n+\frac{1}{12n}}

for all positive integers nn.


For complex arguments, Stirling’s formula holds uniformly in sectors

argz<πε|\arg z| < \pi - \varepsilon

for any fixed ε>0\varepsilon > 0.

This restriction reflects the branch cut of the logarithm.


nnExact n!n!Stirling approximationRelative error
55120120118.02118.021.61.6%
10103.63×1063.63\times10^63.60×1063.60\times10^60.80.8%
50503.04×10643.04\times10^{64}3.04×10643.04\times10^{64}<103<10^{-3}

The approximation becomes remarkably accurate even for moderate nn.




  1. 📜 Original Discovery (18th Century)

    James Stirling introduced the approximation in his 1730 work Methodus Differentialis, primarily as a tool for approximating factorials.

  2. 🔬 Later Refinements

    Laplace and Gauss provided rigorous asymptotic justification and extended the approximation to complex arguments, connecting it to integral methods.

  3. 🌍 Modern Perspective

    Today, Stirling’s formula is a cornerstone of asymptotic analysis, probability theory, and mathematical physics, appearing wherever factorial growth must be controlled.


  • NIST Digital Library of Mathematical Functions (DLMF), §5.11
  • Olver et al., Asymptotics and Special Functions
  • Stirling, Methodus Differentialis (1730)