homechevron_rightStudychevron_rightMathchevron_rightAlgebrachevron_rightlinear algebra


Online calculator computes factorial of given positive integer (up to 170!)

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 by multiplying, then using Stirling's formula. Also it computes lower and upper bounds from inequality above. Unfortunately, due to Javascript implementation it is limited to 170!



Digits after the decimal point: 2
Lower bound
Stirling's approximation
Upper bound