About this tool
Factorial Calculator computes n!, the product of every whole number from 1 up to n, exactly, using JavaScript BigInt arithmetic instead of floating-point numbers. Ordinary numbers cannot hold the exact value of the factorial once it passes 18!, and calculators fall back to scientific notation, but this tool prints every digit. 20! is 2,432,902,008,176,640,000, and 100! runs to 158 digits.
Enter a whole number from 0 to 5,000. The full result appears in the result box with a digit count underneath, and the Copy button copies all the digits. 5,000! has 16,326 digits, so very large answers fill the box and need scrolling. Anything above 5,000 gets a message that the number is too large; the cap keeps the page responsive while the product is calculated. A blank box, a negative number, a decimal or any non-numeric entry simply leaves the result empty instead of showing a number.
By convention 0! and 1! are both 1. Factorials are defined here only for non-negative integers; the gamma function extends them to fractions, but that is not what this tool computes. Factorials count the ways of arranging n distinct items, so they appear in permutations, combinations and probability, and they grow faster than exponential functions, which is why the digit count climbs so quickly.