Stirling’s Approximation Calculator – n! Estimate
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
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
Enter n
Any positive integer — large n welcome
- 2
Evaluate the two factors
√(2πn) and (n/e)ⁿ are shown separately
- 3
Multiply for the estimate
3,598,696 for n = 10
- 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?
What is Stirling for 52?
Does the error ever vanish?
What is the first correction?
Why take logarithms?
Related tools
Pick another tool to continue your calculation.
Euler-Mascheroni Constant γ Calculator
Calculate the Euler-Mascheroni constant gamma to high precision.
Jacobi Symbol Calculator – (a/n)
Calculate the Jacobi symbol (a/n).
2x2 Matrix Inverse Calculator with Steps
Calculate the inverse of a 2x2 matrix.
Matrix Determinant Calculator – 2×2 with Extras
Calculate 2×2 matrix determinant, eigenvalues, and trace.
2x2 Matrix Determinant Calculator
Calculate the determinant of a 2x2 matrix.
Matrix Calculator - Perform Matrix Operations Online
Perform matrix operations online with our free matrix calculator. Calculate matrix addition, multiplication, determinants, inverse, and more. Perfect for linear algebra students and professionals.