Overview
A factorial multiplies a whole number by every positive whole number below it. It's written with an exclamation mark, so 5! means 5 × 4 × 3 × 2 × 1, which is 120.
Enter a whole number from 0 to 20. Factorials grow very quickly, and larger values lose exact precision in a browser.
Worked examples
| Inputs | Result |
|---|---|
| Number (n)7 | 7! = 5040 |
Show 3 more examples
| Number (n)5 | 5! = 120 |
| Number (n)10 | 10! = 3628800 |
| Number (n)20 | 20! = 2432902008176640000 |
Factorial by number
With the calculator's starting values, the result is 5040. The table shows how it changes with the number.
| Number (n) | Factorial |
|---|---|
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7starting value | 5040 |
| 8 | 40320 |
| 9 | 362880 |
| 10 | 3628800 |
How it works
Starting from 1, the number is built up by multiplying each integer up to n. By definition, 0! is 1. Factorials count arrangements: there are n! ways to put n different items in order.
The formula
| n | A whole number from 0 to 20 |
Practical tips
- 7! is 5,040.
- 10! is 3,628,800, the number of ways to arrange 10 books on a shelf.
- A shuffled 52-card deck has 52! possible orders, a number with 68 digits.
Frequently asked questions
Why is 0! equal to 1?
There's exactly one way to arrange nothing, and it keeps formulas such as combinations working.
Can I take the factorial of a negative or decimal number?
Not with this definition. The gamma function extends it to other values, but this calculator only takes whole numbers.
Where are factorials used?
Mostly in probability and counting, such as permutations and combinations, and in some series in calculus.