Skip to main content

Stirling’s Approximation Calculator – n! Estimate

Quick answer

n!

  • ≈ √(2πn)(n/e)ⁿ: for n=10 it gives 3,598,696 vs the true 3,628,800 — just 0.83% low.
  • Relative error ≈ 1/(12n), with corrections shown.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How Stirling’s Approximation Works

n! ≈ √(2πn)·(n/e)ⁿ·(1 + 1/(12n) + …)

Stirling’s formula estimates factorials without multiplying anything: n! ≈ √(2πn)(n/e)ⁿ. For n = 10: √(62.83) ≈ 7.927, (10/e)¹⁰ ≈ 4.5400×10⁵, product ≈ 3,598,696 — within 0.83% of the exact 3,628,800, matching the leading error term 1/(12n) = 1/120 = 0.83%. The approximation is asymptotic: relative error shrinks as n grows (0.083% at n = 100, where the true value has 158 digits) yet the absolute gap widens — estimates are always slightly low without corrections. The calculator prints the two factors, the estimate, the exact value when computable, the relative error, and the first correction (1 + 1/(12n)) which pushes n = 10 to within 0.007%. Uses: log-gammas in statistics, entropy and combinatorics back-of-envelope work (52! ≈ 8.06×10⁶⁷), and anywhere huge factorials meet logarithms via ln n! ≈ n ln n − n.

  1. 1

    Enter n

    Any positive integer — large n welcome

  2. 2

    Evaluate the two factors

    √(2πn) and (n/e)ⁿ are shown separately

  3. 3

    Multiply for the estimate

    3,598,696 for n = 10

  4. 4

    Measure the error

    Relative gap and the 1/(12n) prediction compared

Use Cases

Statistical Mechanics

log n! ≈ n ln n − n drives entropy derivations

Probability Bounds

Estimate binomial coefficients in large-n regimes

Quick Sanity Checks

52! ≈ 8.06×10⁶⁷ without heavy arithmetic

Tips

  • 1

    Relative error ≈ 1/(12n): 0.83% at 10, 0.083% at 100

  • 2

    Estimates sit below the true value until corrected

  • 3

    Log form: ln n! ≈ n ln n − n + ½ln(2πn)

Common Mistakes

  • Forgetting the √(2πn) prefactor and using only (n/e)ⁿ

  • Expecting absolute error to shrink — only relative error does

  • Applying it to small n and ignoring the 8%+ error at n = 1

  • Mixing e ≈ 2.71828 with 10 in the base

FAQs

How good is Stirling for n = 10?

Estimate 3,598,696 vs true 3,628,800 — 0.83% low, exactly the 1/(12n) prediction.

What is Stirling for 52?

≈ 8.06×10⁶⁷, matching the true 52! to the leading digits.

Does the error ever vanish?

Relative error tends to 0 as n → ∞, but absolute difference keeps growing.

What is the first correction?

Multiply by (1 + 1/(12n)): at n = 10 this cuts error to about 0.007%.

Why take logarithms?

ln n! ≈ n ln n − n avoids overflow for enormous n — the working form in statistics.