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!
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/8652/. 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:
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.
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.
Comments