Combination
calculator.
Count the ways to pick r things from n when the order of the picks makes no difference.
- Order matters, P(n, r)
- 1.007 × 10¹⁰
- Order matters, repeats
- 1.384 × 10¹⁰
Order does not matter: each set of 6 can be lined up in 720 orders, so the 10,068,347,520 ordered picks shrink to 13,983,816 sets.
Row 49 of Pascal's triangle
Move r to pick a barRow 49 of Pascal's triangle as a share of all 2 to the power 49 subsets. The bars rise to k = 24 with 11.23% and fall back the same way. Your k = 6 holds 0.000002%.
C(49, k) for every k
| k | C(49, k) | Share |
|---|---|---|
| 0 | 1 | 1.7764 × 10⁻¹³% |
| 1 | 49 | 8.7041 × 10⁻¹²% |
| 2 | 1,176 | 2.089 × 10⁻¹⁰% |
| 3 | 18,424 | 3.2728 × 10⁻⁹% |
| 4 | 211,876 | 3.7637 × 10⁻⁸% |
| 5 | 1,906,884 | 3.3873 × 10⁻⁷% |
| 6 | 13,983,816 | 0.000002% |
| 7 | 85,900,584 | 0.000015% |
One more or one fewer
| Change | Count | Times now |
|---|---|---|
| One more to choose fromC(50, 6) | 15,890,700 | × 1.136 |
| One fewer to choose fromC(48, 6) | 12,271,512 | × 0.878 |
| Choose one moreC(49, 7) | 85,900,584 | × 6.143 |
| Choose one fewerC(49, 5) | 1,906,884 | × 0.136 |
Working
- 1The formula with your numbersC(49, 6) =49!6!×43!
- 2Cancel the larger factorial (43!) from top and bottom=49 × 48 × 47 × 46 × 45 × 446 × 5 × 4 × 3 × 2 × 1
- 3Multiply out and divide=10,068,347,520720= 13,983,816
- 4Check: each set can be ordered in 720 ways (6!), so the count times that is the ordered count13,983,816 × 720 = 10,068,347,520= 49 × 48 × 47 × 46 × 45 × 44
How it's worked out
A combination is a set of r items taken from n different items, where only which items you hold counts. Ann, Ben and Cara form the same team as Cara, Ann and Ben. The count is written C(n, r) and read "n choose r". The NIST Digital Library of Mathematical Functions defines it as the number of ways to choose r objects from n without regard to order.
The sign , said n factorial, is the product 1 × 2 × 3 and so on up to n. The reason for the formula is a simple overcount. Picking r items one at a time, in order, gives n times (n minus 1) and so on, r factors in all. Each set turns up once for every way to line it up, and r items can be lined up in r factorial ways, written . Dividing by that number removes the repeats.
In practice the larger factorial on the bottom cancels with most of the top. For 3 from 10, the factorial of 7 cancels and leaves three factors over three: 10 × 9 × 8 over 3 × 2 × 1, which is 720 over 6, or 120. The steps in the tool do the same and then check the result by multiplying back by .
That second line is Pascal's rule. Pick any one item: a set either holds it or does not, and those two groups add up to the whole. Choosing what to keep is also the same as choosing what to leave out, so C(10, 3) and C(10, 7) are both 120.
If the same item may be picked more than once, the count changes to C(n + r − 1, r), the stars and bars count. Three scoops from 5 flavors give 35 cups with repeats allowed, against 10 with three different flavors.
Worked examples
Priya checks the odds of her lottery ticket
Priya's lottery draws 6 balls from 49, and the order they come out in does not matter. Her ticket wins the top prize only if it holds the exact 6 numbers drawn.
The top multiplies out to 10,068,347,520 and the bottom to 720, so there are 13,983,816 possible tickets. With a fair draw, one ticket has a chance of 1 in 13,983,816.
If the game added a 50th ball, the count would rise to 15,890,700, about 1.14 times as many. Asking players to pick 7 numbers from 49 instead would give 85,900,584.
Sam counts poker hands with exactly two aces
A five-card hand from a 52-card deck is a combination, since a hand is the same whatever order the cards arrive in. There are 2,598,960 hands in all.
For exactly two aces, Sam splits the hand into two choices: 2 of the 4 aces, and 3 of the 48 cards that are not aces. Those are 6 and 17,296 ways, and every pair of choices makes a different hand, so he multiplies them.
Out of 2,598,960 hands, that is 3.99%. Use the tool for each part, C(4, 2) and C(48, 3), and multiply.
A committee of 3, or three named roles
A club of 10 wants a committee of 3. Any three people form one committee, so there are C(10, 3) = 120 choices.
If the three take a chair, a secretary and a treasurer, the order now matters. That gives P(10, 3) = 720, which is 6 times as many, because each committee can hand out the three roles in ways.
Reading your result
The count, not a chance. C(n, r) counts sets. It turns into a probability only when every set is equally likely, as in a fair draw or a well shuffled deck. Then one set has a chance of 1 over the count. A team picked by a coach is not a random draw, so the count says nothing about how likely a team is.
Large numbers stay exact. Twenty numbers from 80 give 3,535,316,142,212,174,320, a 19-digit count. Ordinary floating-point arithmetic keeps only about 16 digits, so a phone calculator rounds it. This tool works in whole numbers, so every digit is correct.
Zero and one are real answers. Choosing 7 different items from 5 cannot be done, so the count is 0. Choosing nothing from 8 can be done in exactly 1 way, the empty set.
The row shows the shape. For a fixed n, the counts rise to the middle value of r and fall back in mirror image. Picking half the items gives the most sets, and picking almost all of them gives as few as picking almost none.
Common mistakes
- Using a combination when order matters. Seats, rankings, PIN codes and race results depend on order, so they need P(n, r) or n to the power r instead.
- Adding counts that should be multiplied. Two aces and three other cards is two choices made together, so the counts multiply. Add only when the cases cannot happen at the same time.
- Allowing repeats by accident. A lottery ball cannot be drawn twice, but a pizza can have double cheese. Pick the rule that matches the problem before you count.
- Dividing huge factorials on a calculator. The factorial of 52, , has 68 digits, so the division loses digits on most calculators. Cancel the larger factorial first, as the steps do.