Using the calculator
Type a whole number up to 5,000. The factorial appears in full as you type, with its number of digits and how many zeros it ends in.
The answers are exact, not rounded. A phone calculator shows 25! as about 1.55 × 10^25; this gives all 26 digits.
What a factorial is
n! means every whole number from n down to 1 multiplied together. 5! is 5 × 4 × 3 × 2 × 1 = 120, and it counts the ways to put 5 things in a row.
The numbers grow fast. 10! is already 3,628,800, and 52!, the number of ways to shuffle a deck of cards, is about 8.07 × 10^67.
0! is 1. There's exactly one way to arrange nothing, and the rule n! = n × (n − 1)! needs it: 1! = 1 × 0!.
Why factorials end in zeros
Every trailing zero comes from a 10, which is a 2 times a 5. There are always more 2s than 5s among the factors, so counting the 5s gives the zeros. Divide n by 5, then by 25, then by 125, rounding each down, and add them up. For 100! that's 20 + 4 = 24 zeros.
Where the exclamation mark came from
The French mathematician Christian Kramp introduced the n! sign in 1808. The idea is much older. A Jain text, the Anuyogadvāra-sūtra, is one of the earliest known to describe factorials, and in 1677 Fabian Stedman used them to count the orders in which a set of church bells can ring.
Questions
What is 0 factorial?
1. There's one way to arrange nothing.
Can you take the factorial of a negative number or a fraction?
Not with this definition. The gamma function extends it to fractions, but negative whole numbers have no factorial at all.
How many digits does 1000! have?
2,568. Type 1000 to see them all.
Sources
Added and reviewed . What's new
