Combination Calculator
Enter n and r and the combination calculator counts the ways to choose, with the formula worked through. It also gives the permutation count and both counts with repetition, so you can see which one your question needs.
Combinations
- Formula
- C(n, r) = n! / (r! (n - r)!) = 10! / (3! × 7!)
- Worked out
- 7! cancels from the top, leaving (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120.
- Permutations, P(10, 3) P = C × r!. Each unordered group of 3 can be put in 6 orders, so the ordered count is 6 times larger.
- 720
- Chance of one particular outcome 0.833333%, if every selection is equally likely, as in a fair draw.
- 1 in 120
| Order matters | Order does not matter | |
|---|---|---|
| Each item at most once | P(10, 3) = 720 | C(10, 3) = 120 |
| Items can repeat | 10^3 = 1,000 | C(12, 3) = 220 |
- Every count is exact: whole-number arithmetic with no rounding, and no factorial is built only to be divided away.
How the Combination Calculator works
A combination is a selection where order does not matter. A permutation is one where it does. Picking 3 people from 10 for a committee is a combination: Ana, Ben and Cal is the same committee in any order. Picking a president, a secretary and a treasurer from the same 10 is a permutation, because Ana as president and Ben as secretary differs from the reverse.
The combination formula is C(n, r) = n! / (r! (n - r)!), read "n choose r" and written nCr on most calculators. For 3 from 10 it is 10! / (3! × 7!). Nobody needs 10! to work it out. The 7! cancels from the top, leaving (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. The calculator shows that reduced form for every answer, because it is the one to write in homework. It works as a permutation and combination calculator in one: the table under the result gives all four counts for your n and r.
The permutation formula is P(n, r) = n! / (n - r)!, written nPr. For 3 from 10 it is 10 × 9 × 8 = 720. Every group of 3 can be put in 3! = 6 orders, so there are 6 times as many permutations as combinations: 120 × 6 = 720.
With repetition. When an item can be picked more than once, the counts change. Ordered picks with repeats allowed are n^r: a 4-digit PIN has 10^4 = 10,000 possibilities. Unordered picks with repeats allowed are C(n + r - 1, r), the stars and bars count. Three scoops from 10 ice cream flavors, where two scoops of chocolate is allowed and the order in the cone is ignored, is C(12, 3) = 220.
How to decide which one. Ask two questions. Would swapping two of the chosen items give a different outcome? If yes, order matters and it is a permutation. Can the same item appear twice? If yes, it is a count with repetition. A lottery ticket is a combination without repetition: a 6-from-49 draw has C(49, 6) = 13,983,816 possible tickets. A 5-card poker hand is C(52, 5) = 2,598,960. Powerball picks 5 balls from 69 and 1 from 26, so a ticket is one of C(69, 5) × 26 = 11,238,513 × 26 = 292,201,338.
Two checks. C(n, r) always equals C(n, n - r), because choosing 3 to keep is the same as choosing 7 to leave out. And C(n, r) is entry r of row n of Pascal's triangle, counting both from 0, which is why row 10 reads 1, 10, 45, 120, and so on.
These counts grow fast. C(100, 50) has 30 digits, and 52 cards can be ordered in 52!, a 68-digit number. A phone calculator rounds those to a few significant figures, and a spreadsheet's COMBIN function loses the exact value past about 15 digits. The combination calculator works in exact whole-number arithmetic up to n = 10,000 and prints every digit up to 400 of them.
Combination Calculator FAQ
What is the combination formula?
C(n, r) = n! / (r! (n - r)!). For 3 items from 10 that is 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 120. It counts selections where order does not matter.
What is the difference between a permutation and a combination?
Order. A permutation counts arrangements where order matters, P(n, r) = n! / (n - r)!. A combination counts selections where it does not. For 3 from 10 there are 720 permutations and 120 combinations, because each group of 3 has 3! = 6 orders.
What does nCr mean on a calculator?
n choose r: the number of combinations of r items from n. On most scientific calculators you type n, press nCr, type r and press equals. 10 nCr 3 gives 120.
How do I count combinations with repetition?
Use C(n + r - 1, r). Choosing 3 scoops from 10 flavors with repeats allowed is C(12, 3) = 220. If order matters as well, it is n^r instead: 10^3 = 1,000.
How many combinations does a 4-digit code have?
10,000, from 10^4, if digits can repeat and order matters, which is how a PIN or a lock code works. With no repeated digits it is P(10, 4) = 5,040. A so-called combination lock is really counting permutations.