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:
n! = 1\cdot 2\cdot\ldots\cdot n =\prod_{i=1}^n i

The special case 0! is defined to have a 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 the calculation at any time.

PLANETCALC, Factorial

Factorial

Factorial n!
 

Javascript note

We adopted the big integers library for our calculators quite a long time ago, but I didn't have the opportunity to use it for factorial calculation until this time. 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 an external library. And, with a big integers library, you are practically unlimited. Of course, there are a couple of caveats, like you have to compute factorial iteratively; otherwise, you run out of the stack, but technically, you are limited only by the time you are willing to wait until calculation completes.

URL copied to clipboard
PLANETCALC, Factorial

Comments