homechevron_rightStudychevron_rightMathchevron_rightAlgebra

# Stirling's approximation of factorial

Online calculator computes Stirling's approximation of factorial of given positive integer (up to 170!)

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/170/. Also, please do not modify any references to the original work (if any) contained in this content.

Factorial n! of a positive integer n is defined as:
$n! = 1\cdot 2\cdot\ldots\cdot n =\prod_{i=1}^n i$
The special case 0! is defined to have value 0! = 1

There are several approximation formulae, for example, Stirling's approximation, which is defined as:
$n! = \sqrt{2\pi n}\left(\frac{n}{e}\right)^n \left(1 + \frac{1}{12 n} + \frac{1}{288 n^2} - \frac{139}{51840 n^3}+O\left(n^{-4}\right)\right)$

For simplicity, only main member is computed
$n! \approx \sqrt{2\pi n}\left(\frac{n}{e}\right)^n$

with the claim that
$\sqrt{2\pi n}\left(\frac{n}{e}\right)^n < n! < \sqrt{2\pi n}\left(\frac{n}{e}\right)^n e^{1/(12n)}$

This calculator computes factorial, then its approximation using Stirling's formula. Also, it computes lower and upper bounds from inequality above.

Unfortunately, because it operates with floating-point numbers to compute approximation, it has to rely on Javascript numbers and is limited to 170!

For the UNLIMITED factorial, check out this unlimited factorial calculator

#### Factorial

Digits after the decimal point: 2
n!

Lower bound

Stirling's approximation

Upper bound

URL copied to clipboard

#### Similar calculators

PLANETCALC, Stirling's approximation of factorial