Math
Combination Calculator
Enter how many items there are and how many you take to see the combinations and permutations.
The formula
combinations = n! ÷ (r! × (n − r)!)
permutations = n! ÷ (n − r)!
orderings = r!
Worked example
The 6-from-49 lottery draw
- 49 choose 6 = 13,983,816 combinations
- One ticket is one of them
- 1 ÷ 13,983,816 = 0.0000072% per draw
Where this goes wrong
Counting orderings the problem does not care about
Choosing 6 numbers from 49 gives 13,983,816 combinations but 10,068,347,520 permutations — 720 times more, because a lottery ticket does not care what order the balls come out. Using the ordered count makes a one-in-fourteen-million chance look like one in ten billion.
Questions
- When does order matter?
- When the positions are distinguishable. A podium of gold, silver and bronze is a permutation; a committee of three is a combination. Ask yourself whether swapping two chosen items produces a different outcome.
- Why can I not just use factorials directly?
- Because 171! overflows what a computer can hold as a number, while 200 choose 3 is only 1,313,400. This page multiplies and divides in step so the intermediate values stay small, which is why large draws still work here.
- What if items can repeat?
- These formulas assume each item is taken at most once. Drawing with replacement — where the same number can come up twice — uses different arithmetic and gives larger counts.