What is Stirling's Formula
2026-02-28 10:05 Diff

164 Learners

Last updated on October 7, 2025

Stirling's formula is an approximation used in mathematics to estimate factorials, particularly useful for large numbers. In this topic, we will explore the derivation, applications, and uses of Stirling's formula.

Understanding Stirling's Formula

Stirling's formula is a powerful tool used to approximate factorials. Let’s delve into the derivation, application, and accuracy of Stirling's formula.

Derivation of Stirling's Formula

Stirling's formula provides an approximation for n!, which is the factorial of n. It is derived using methods from calculus and asymptotic analysis.

The formula is expressed as:\( [ n! \approx \sqrt{2\pi n} \left(\frac{n}{e}\right)^n ] \) Where \((\pi)\) is the constant pi, and\( (e)\) is the base of natural logarithms.

Applications of Stirling's Formula

Stirling's formula is widely used in various fields of mathematics and science for simplifying calculations involving large factorials. It is particularly useful in probability theory, statistical mechanics, and combinatorics where exact computation of factorials becomes cumbersome.

Explore Our Programs

Accuracy of Stirling's Formula

Stirling's approximation is most accurate for large values of n. For small values, the error can be significant. However, the relative error decreases as n increases, making it an invaluable approximation for large-scale problems.

Importance of Stirling's Formula

In mathematics and science, Stirling's formula is crucial for simplifying complex factorial computations. Here are some reasons why it's important: 

  • It allows the calculation of large factorials without computational overload. 
  • It aids in understanding the behavior of functions involving factorials. 
  • Stirling's formula is foundational in asymptotic analysis and big O notation.

Tips and Tricks to Remember Stirling's Formula

Stirling's formula can seem complex, but with some tips, it can be easier to remember: 

  • Recall that the formula involves \((\sqrt{2\pi n}) \)and \((\left(\frac{n}{e}\right)^n). \)
  • Visualize the formula as a product of a "scale factor"\( (\sqrt{2\pi n})\) and an "exponential term" \((\left(\frac{n}{e}\right)^n). \)
  • Practice using the formula in different contexts to reinforce memory.

Common Mistakes and How to Avoid Them While Using Stirling's Formula

Even though Stirling's formula is a powerful tool, users may encounter some common errors. Here are some pitfalls and how to avoid them.

Problem 1

Estimate 10! using Stirling's formula.

Okay, lets begin

Approximately 3.6 million

Explanation

Using Stirling's formula:\( [ 10! \approx \sqrt{2\pi \times 10} \left(\frac{10}{e}\right)^{10} ]\)

\([ \approx \sqrt{20\pi} \times \left(\frac{10}{2.718}\right)^{10} ]\)

\([ \approx 3.6 \times 10^6 ]\)

Well explained 👍

Problem 2

How would you apply Stirling's formula to approximate 15!?

Okay, lets begin

Approximately 1.3 trillion

Explanation

Using Stirling's formula: \([ 15! \approx \sqrt{2\pi \times 15} \left(\frac{15}{e}\right)^{15} ]\)


\([ \approx \sqrt{30\pi} \times \left(\frac{15}{2.718}\right)^{15} ] \)

\([ \approx 1.3 \times 10^{12} ]\)

Well explained 👍

Problem 3

Estimate 20! with Stirling's formula.

Okay, lets begin

Approximately 2.4 quintillion

Explanation

Using Stirling's formula: \([ 20! \approx \sqrt{2\pi \times 20} \left(\frac{20}{e}\right)^{20} ] \)


\([ \approx \sqrt{40\pi} \times \left(\frac{20}{2.718}\right)^{20} ] \)

\([ \approx 2.4 \times 10^{18} ]\)

Well explained 👍

Problem 4

Using Stirling's formula, approximate 25!.

Okay, lets begin

Approximately 1.5 septillion

Explanation

Using Stirling's formula: \([ 25! \approx \sqrt{2\pi \times 25} \left(\frac{25}{e}\right)^{25} ] \)


\([ \approx \sqrt{50\pi} \times \left(\frac{25}{2.718}\right)^{25} ] \)

\([ \approx 1.5 \times 10^{24} ]\)

Well explained 👍

Problem 5

How accurate is Stirling's approximation for 30!?

Okay, lets begin

Very accurate with a small relative error

Explanation

For large n such as 30, Stirling's formula provides a very close approximation to the exact value of 30!, with the relative error being minimal compared to the factorial's magnitude.

Well explained 👍

FAQs on Stirling's Formula

1.What is Stirling's formula?

Stirling's formula is an approximation used to estimate factorials, particularly useful for large numbers.

2.What is the basic form of Stirling's formula?

The basic form is \(( n! \approx \sqrt{2\pi n} \left(\frac{n}{e}\right)^n ).\)

3.Why use Stirling's formula?

Stirling's formula simplifies calculations involving large factorials, making it useful in various mathematical and scientific fields.

4.Is Stirling's formula accurate for small n?

No, Stirling's formula is less accurate for small n and is better suited for large numbers.

5.What fields use Stirling's formula?

Fields like probability theory, statistical mechanics, and combinatorics commonly use Stirling's formula.

Glossary for Stirling's Formula

  • Stirling's Formula: An approximation for estimating factorials, particularly useful for large numbers.
  • Factorial: A product of all positive integers up to a given number n, denoted as n!.
  • Asymptotic Analysis: A method of describing limiting behavior and approximations for large numbers.
  • Natural Logarithm: A logarithm to the base e, where e is approximately equal to 2.718.
  • Relative Error: The absolute error divided by the true value, indicating the accuracy of an approximation.

Jaskaran Singh Saluja

About the Author

Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.