BrightChamps Logo
Login

Summarize this article:

Live Math Learners Count Icon102 Learners

Last updated on October 7, 2025

What is Stirling's Formula

Professor Greenline Explaining Math Concepts

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.

What is Stirling's Formula for US Students
Professor Greenline from BrightChamps

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.

Professor Greenline from BrightChamps

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.

Professor Greenline from BrightChamps

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.

Professor Greenline from BrightChamps

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.

Professor Greenline from BrightChamps

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.
Professor Greenline from BrightChamps

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.
Max Pointing Out Common Math Mistakes

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.

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Misapplying Stirling's Formula for Small n

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Stirling's formula is less accurate for small values of n. To avoid errors, ensure that n is large enough for the approximation to be valid. For small n, compute factorials directly if possible.

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Ignoring the Factor of \(( \sqrt{2\pi n} )\)

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

A common mistake is neglecting the factor of\((\sqrt{2\pi n})\). This can lead to significant errors. Always include this factor when using the formula.

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Confusing e with Euler's Constant

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Sometimes, students confuse the base of natural logarithms, e, with Euler's constant, \((\gamma)\). Remember that in Stirling's formula, e is the base of the natural logarithm.

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Overestimating the Accuracy for Moderate n

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

While Stirling's formula is effective for large n, it may not be precise for moderate values. Always consider the context and the necessary precision before applying the formula.

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Forgetting to Multiply by n

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

When using the exponential component \((\left(\frac{n}{e}\right)^n),\) do not forget to multiply by n when setting up the expression. This misstep can lead to incorrect calculations.

arrow-right
Max from BrightChamps Saying "Hey"
Hey!

Examples of Problems Using Stirling's Formula

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

Estimate 10! using Stirling's formula.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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 ]\)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 2

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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} ]\)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 3

Estimate 20! with Stirling's formula.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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} ]\)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 4

Using Stirling's formula, approximate 25!.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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} ]\)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 5

How accurate is Stirling's approximation for 30!?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Ray Thinking Deeply About Math Problems

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.

Math FAQ Answers Dropdown Arrow

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 ).\)

Math FAQ Answers Dropdown Arrow

3.Why use Stirling's formula?

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

Math FAQ Answers Dropdown Arrow

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.

Math FAQ Answers Dropdown Arrow

5.What fields use Stirling's formula?

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

Math FAQ Answers Dropdown Arrow
Professor Greenline from BrightChamps

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.
Math Teacher Background Image
Math Teacher Image

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.

Max, the Girl Character from BrightChamps

Fun Fact

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

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
UAE - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom