5! = 120 and 10! = 3,628,800; by 25! the result already has 26 digits.
| n | n! | Digits |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 6 | 1 |
| 4 | 24 | 2 |
| 5 | 120 | 3 |
| 6 | 720 | 3 |
| 7 | 5,040 | 4 |
| 8 | 40,320 | 5 |
| 9 | 362,880 | 6 |
| 10 | 3,628,800 | 7 |
| 11 | 39,916,800 | 8 |
| 12 | 479,001,600 | 9 |
| 13 | 6,227,020,800 | 10 |
| 14 | 87,178,291,200 | 11 |
| 15 | 1,307,674,368,000 | 13 |
| 16 | 20,922,789,888,000 | 14 |
| 17 | 355,687,428,096,000 | 15 |
| 18 | 6,402,373,705,728,000 | 16 |
| 19 | 121,645,100,408,832,000 | 18 |
| 20 | 2,432,902,008,176,640,000 | 19 |
| 21 | 51,090,942,171,709,440,000 | 20 |
| 22 | 1,124,000,727,777,607,680,000 | 22 |
| 23 | 25,852,016,738,884,976,640,000 | 23 |
| 24 | 620,448,401,733,239,439,360,000 | 24 |
| 25 | 15,511,210,043,330,985,984,000,000 | 26 |
How it is computed
n! = n × (n − 1) × … × 2 × 1, with 0! = 1 by convention. Each value is the previous one times n, computed with exact big-integer arithmetic so no digit is rounded.
FAQ
Why is 0! equal to 1?+
There is exactly one way to arrange zero objects, and n! = n × (n − 1)! only holds for n = 1 if 0! = 1.
What are factorials used for?+
Counting arrangements: n! is the number of orders for n distinct items. Combinations and permutations, and so probabilities, are built from them.