# Factorial

This online calculator calculates factorial of a positive integer. Practically unlimited positive integer. In fact, it is limited only by the time you are willing to wait until calculation completes. I was patient enough to wait for 100000!

Factorial n! of a positive integer n is defined as:

The special case 0! is defined to have value of 1: 0! = 1

This calculator below can calculate ANY factorial you want (unless you run out of computer memory to hold the resulting number), if you are willing to wait. So, go on, enter the positive integer and wait for the result. Note that you can stop calculation at any time.

### Javascript note

We have adopted big integers library for our calculators quite a long time ago, but until this time I didn't have the opportunity to use it for factorial calculation. Now I do. In normal Javascript you are limited to numbers, which are double-precision floating point numbers, and the maximum factorial you can get is 170! (See Stirling's approximation of factorial)

Yeah, I know, big integers will be included in ES2020, but not yet, so we rely on external library. And, with big integers library, you are practically unlimited. Of course there are couple of caveats, like you have to compute factorial iteratively, otherwise you run out of stack, but technically, you are limited only by time you are willing to wait until calculation completes.

## Comments