Does order matter? Answer that first
Before you touch a formula, ask yourself one question: if I picked the same items in a different order, would it count as a different result? A poker hand is a combination: ace, king, queen, jack, ten is the same hand no matter which card landed in your hand first. A podium finish is a permutation: gold, silver, bronze is a completely different outcome from bronze, silver, gold, even though it's the same three runners. Get that one question right and the rest of this page is just arithmetic.
The two formulas
Combinations (nCr) count groups: order thrown out. Permutations (nPr) count arrangements: order kept.
You never need to compute a full factorial by hand. Both formulas collapse to the same trick: n! divided by (n - r)! cancels down to just the r numbers counting down from n. For 52 items choosing 5, 52! / 47! cancels to 52 x 51 x 50 x 49 x 48, six enormous factorials reduced to one short multiplication. For nCr, divide that product by r! on top of the cancellation; for nPr, you're already done.
Worked example: the 6/49 lottery
A lottery draws 6 numbers from 49, and the order they're pulled in doesn't change whether you win, so this is a combination: C(49,6).
Cancel the factorials: 49! / 43! = 49 x 48 x 47 x 46 x 45 x 44 = 10,068,347,520.
Divide by 6! = 720 to remove the orderings: 10,068,347,520 / 720 = 13,983,816.
That's the real math behind "your odds of winning are about 1 in 14 million." One ticket, one shot at 1 of 13,983,816 equally likely combinations.
When does order matter? A quick decision guide
| Situation | Order matters? | Use |
|---|---|---|
| Picking a 5-card poker hand | No | Combination |
| Choosing 3 pizza toppings | No | Combination |
| Setting a 4-digit PIN | Yes | Permutation |
| Ranking a race podium (1st, 2nd, 3rd) | Yes | Permutation |
| Picking a committee of 5 people | No | Combination |
| Assigning president, secretary, and treasurer from a group | Yes | Permutation |
One more wrinkle: combinations with repetition
Both formulas above assume you can't pick the same item twice, which covers cards, lottery balls, and committee seats. If repeats are genuinely allowed and order still doesn't matter, such as choosing 3 scoops of ice cream from 5 flavors where you're free to repeat a flavor, the count is C(n + r - 1, r) instead, a related but different formula this calculator doesn't run directly. Most real counting problems, from card hands to lottery tickets to committees, don't allow repeats, which is why that's the default here.
Want to explore the odds themselves rather than just the count? Our probability calculator and dice roller pick up where a raw combination count leaves off. If lottery odds got you here, our annuity payout calculator has a lottery mode for the fun part, spending the winnings. And if percentages are what you actually needed, the percentage calculator is one click away.