What the Factorial Calculator does
The Factorial Calculator gives exact factorials, not rounded ones: 100! shows all 158 digits. It also works out combinations (how many ways to choose r items from n, when order does not matter) and permutations (when order does), which come up in probability, lotteries and seating plans.
How to use it
- Choose n!, Combinations nCr or Permutations nPr.
- Enter n, and r if needed. n can be up to 5,000.
- Read the answer with its number of digits and, for long results, the scientific form.
- For very long answers, copy every digit or download them as a text file.
Example
20! = 2,432,902,008,176,640,000, a 19-digit number with 4 trailing zeros, or about 2.432902 × 10^18. A 5-card poker hand drawn from 52 cards has 52C5 = 2,598,960 possibilities, and choosing a captain, vice-captain and wicket-keeper from 10 players in order gives 10P3 = 720 ways.
The formulas
- n! = n × (n − 1) × … × 2 × 1, and 0! = 1
- nPr = n! ÷ (n − r)!
- nCr = n! ÷ (r! × (n − r)!)
Trailing zeros come from factors of 10, that is pairs of 2 and 5. There are always more 2s, so the tool counts the 5s: 100! has 20 + 4 = 24 trailing zeros.
Factorials from 0 to 15
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5,040 |
| 8 | 40,320 |
| 9 | 362,880 |
| 10 | 3,628,800 |
| 11 | 39,916,800 |
| 12 | 479,001,600 |
| 13 | 6,227,020,800 |
| 14 | 87,178,291,200 |
| 15 | 1,307,674,368,000 |
A double factorial, written n!!, multiplies every second number instead: 7!! = 7 × 5 × 3 × 1 = 105 and 8!! = 8 × 6 × 4 × 2 = 384. Multifactorials skip more numbers in the same way. This tool works out the ordinary n!, so work those out by hand or step by step.
For arrangements and selections with repetition, use the Permutation and Combination Calculator.
Questions people ask
Why is 0! equal to 1?
There is exactly one way to arrange nothing, and the rule n! = n × (n − 1)! only works if 0! = 1.
When should I use combinations instead of permutations?
Use combinations when order does not matter, such as choosing a team. Use permutations when it does, such as first, second and third place.
Is the answer exact?
Yes. The tool uses whole-number arithmetic with no rounding, however many digits there are.
How big do factorials get?
Very quickly. 10! is 3,628,800, 20! has 19 digits and 100! has 158. That is why the tool counts the digits and shows a scientific form for long answers.
Is my input sent anywhere?
No. Even 5,000! is worked out in your browser and never leaves your device.