What a factorial is
The factorial of a non-negative whole number n, written n!, is the product of every whole number from 1 up to n. It counts the number of ways to arrange n distinct items in order, and it appears throughout combinatorics, probability and calculus.
By definition 0! = 1 (there is exactly one way to arrange nothing), and factorials are only defined for non-negative whole numbers. Each step multiplies the running total by the next integer, so n! grows extremely fast.
Worked example
Compute 5!:
Large values and precision
Factorials explode: 13! already exceeds a billion, and 21! overflows a normal 64-bit number. This calculator uses BigInt arithmetic, so the answer is exact no matter how many digits it has - 100! is shown in full, all 158 digits of it. For very large n the result is also summarised by its digit count and scientific-notation form so it stays readable. Everything is computed in your browser.