Factorials grow faster than any exponential but are unwieldy to work with in asymptotic analysis: expressions like $\binom{2n}{n}$ or $n^n / n!$ arise constantly in probability, combinatorics, and statistical mechanics, and simplifying them requires knowing how $n!$ behaves for large $n$. Stirling's formula provides the answer — $n!$ is asymptotically $\sqrt{2\pi}\, n^{n+1/2} e^{-n}$ — turning the discrete product $1 \cdot 2 \cdots n$ into a closed-form expression that is easy to manipulate.
In probability, Stirling's formula is indispensable for analysing the binomial distribution. It is the key ingredient in deriving the normal approximation to $\operatorname{Bin}(n, p)$ (the de Moivre--Laplace theorem) and in computing the return probabilities of simple random walks. The weaker form, [Weak Stirling](/theorems/1110), which states only that $\log(n!) \sim n \log n$, suffices for many entropy and information-theoretic calculations, but the precise constant $\sqrt{2\pi}$ in the full formula is essential whenever exact leading-order coefficients matter — for instance, when computing the probability that a symmetric random walk returns to the origin at step $2n$, which equals $\binom{2n}{n} 2^{-2n} \sim 1/\sqrt{\pi n}$.