Factorial Calculator
Max value: 170 (JavaScript limit)
Factorial Reference Table
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5040 |
| 8 | 40320 |
| 9 | 362880 |
| 10 | 3628800 |
| 11 | 39916800 |
| 12 | 479001600 |
The Notation
Related Calculators
Understanding Factorials
What is a Factorial?
A factorial (denoted as n!) is the product of all positive integers less than or equal to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely fast and are fundamental in combinatorics, probability, and calculus.
Factorial Definition
n! = n × (n-1) × (n-2) × ... × 2 × 1
Special cases:
0! = 1 (by definition)
1! = 1
Permutations
A permutation is an arrangement of objects where order matters. P(n,r) calculates how many ways to arrange r items from a set of n items.
Example: How many ways can 3 people win gold, silver, and bronze from 8 contestants?
Combinations
A combination is a selection of objects where order doesn't matter. C(n,r) calculates how many ways to choose r items from a set of n items.
Example: How many ways can you choose 3 people from a group of 8 for a committee?
Permutations vs Combinations
| Scenario | Order Matters? | Use |
|---|---|---|
| Arranging books on a shelf | Yes | Permutation |
| Choosing team members | No | Combination |
| Race finishing positions | Yes | Permutation |
| Selecting lottery numbers | No | Combination |
| Creating a password | Yes | Permutation |
How Fast Do Factorials Grow?
| n | n! | Digits |
|---|---|---|
| 5 | 120 | 3 |
| 10 | 3,628,800 | 7 |
| 20 | 2.43 × 10¹⁸ | 19 |
| 50 | 3.04 × 10⁶⁴ | 65 |
| 100 | 9.33 × 10¹⁵⁷ | 158 |
Real-World Applications
- • Probability: Calculating odds in card games, dice, lotteries
- • Cryptography: Key space calculations for encryption
- • Statistics: Binomial coefficients, distributions
- • Computer Science: Algorithm complexity analysis
- • Physics: Quantum mechanics, statistical mechanics
Frequently Asked Questions
What is 0! (zero factorial) and why does it equal 1?
By mathematical convention, 0! = 1. This isn't arbitrary - it's necessary for many formulas to work correctly. For example, the combination formula C(n,n) = n!/(n!*0!) should equal 1 (there's exactly one way to choose all items), which only works if 0! = 1.
What's the difference between permutations and combinations?
Permutations count arrangements where order matters (like race positions: 1st, 2nd, 3rd are different from 3rd, 2nd, 1st). Combinations count selections where order doesn't matter (like choosing team members: {A,B,C} is the same as {C,B,A}). Permutations are always larger or equal to combinations.
Why do factorials grow so fast?
Factorials grow faster than exponential functions because each term adds another multiplication. 10! is about 3.6 million, 20! exceeds 2 quintillion, and 100! has 158 digits. This rapid growth is why factorials quickly exceed calculator limits.
How are factorials used in probability?
Factorials are fundamental to probability calculations. They're used to count possible arrangements (permutations) and selections (combinations). For example, calculating lottery odds, card hand probabilities, or the number of ways to arrange items all require factorials.