What a factorial is
The factorial of n, written n!, is the product of all whole numbers from 1 to n: 5! = 1 × 2 × 3 × 4 × 5 = 120. It counts the ways to arrange n different things in order: 5 books on a shelf can be arranged in 120 ways, a deck of 52 cards in 52! ways, a number with 68 digits.
Factorials grow faster than any exponential. 10! is about 3.6 million, 20! is over 2 quintillion, and 70! is larger than a googol (10¹⁰⁰).
Why 0! = 1
There is exactly one way to arrange zero items: do nothing. The definition also keeps formulas like n! = n × (n − 1)! and the combinations formula working at their edges.
Worked example
10! = 3,628,800 (7 digits). 25! = 15,511,210,043,330,985,984,000,000, which ordinary calculators round to 1.551121 × 10²⁵.
How this works
The page multiplies 1 × 2 × 3 … × n using arbitrary-precision integers (JavaScript BigInt), so the result is exact to the last digit, with no rounding. It shows the full number for results up to 60 digits and a scientific-notation summary above that, plus the exact digits in a separate row and the total digit count. Inputs from 0 to 5,000 are accepted. Everything runs in your browser.
Frequently asked
What is 0 factorial?
1. There is exactly one way to arrange nothing, and it keeps n! = n × (n−1)! true for n = 1.
Can I calculate the factorial of a negative number or a decimal?
Not as a factorial. The gamma function extends it, but negative integers have no value.
How many trailing zeros does 100! have?
24: count the factors of 5 (20 multiples of 5 plus 4 of 25).
Why do calculators show 1.551121e+25?
They use floating-point numbers with about 16 digits. This page uses exact integers.
Sources
Reviewed Oct 17, 2026 · test vectors fixtures/calculators/math/factorial-calculator/