What is a combination?
A combination counts the ways to choose a group when the order does not matter. Picking any 3 people out of 10 for a committee is a combination: the group {Asha, Ben, Cara} is one committee, no matter what order you name them in. The count is C(10, 3) = 120. This calculator works out combinations for any n and r, and shows the permutation count alongside so you can see the difference at a glance.
Combinations are the counting tool for anything where the group is the whole story: a hand of cards, a lottery ticket, a team, a sample of products pulled off a production line. The order the items were picked in changes nothing about the group, so the count is smaller than the permutation count — 120 groups against 720 arrangements for n = 10, r = 3. The gap between the two is exactly r!, the number of ways to order the chosen items.
Type n, the number of items to choose from, and r, how many you pick, and the results update live. The maths runs entirely in your browser — nothing is uploaded, nothing is stored, and there is no sign-up. It is built for students working through counting problems, and for anyone who needs a quick answer to a real choosing question.
The combination formula, worked with real numbers
The formula is C(n, r) = n! ÷ (r! × (n − r)!). For n = 10 and r = 3, that is 10! ÷ (3! × 7!) = 3,628,800 ÷ (6 × 5,040) = 3,628,800 ÷ 30,240 = 120. The factorials look intimidating, but most of them cancel: the useful shortcut is to compute the permutation count first, 10 × 9 × 8 = 720, and then divide by r!, which is 3! = 6, giving 720 ÷ 6 = 120.
A second shortcut is symmetry: C(n, r) equals C(n, n − r). Choosing 3 people out of 10 to form a committee is the same count as choosing 7 people to leave out — C(10, 3) = C(10, 7) = 120. The calculator uses this to keep the arithmetic small: it always works with the smaller of r and n − r, so C(10, 7) is computed as C(10, 3) and the answer is exact.
The edge cases are worth knowing. C(n, 0) is 1: there is exactly one way to choose nothing. C(n, n) is 1: there is exactly one way to choose everything. C(n, 1) is n, since there are n choices for a single item. And C(5, 2) is 10 — the ten pairs you can make from five items, which is the answer to the classic question of how many handshakes happen when five people each shake hands with everyone else once.
The n and r inputs — which is which
n is the pool you choose from, and r is how many you pick. Choosing 3 out of 10 is n = 10, r = 3, giving 120 combinations. Swapping them gives n = 3, r = 10, which is meaningless — you cannot pick 10 items out of 3 — and the calculator shows a dash. If you see a dash, the first thing to check is whether n is the bigger number.
Both inputs must be whole numbers. A combination of 10 choose 3.5 does not exist, and neither does 10 choose −2. The calculator caps n at 170, because factorials beyond that overflow ordinary computer arithmetic; for the sizes people actually use — lottery draws, card hands, committee picks — 170 is far more than enough.
The most common error is not the inputs but the choice of tool: using a combination when the question is really about arrangements. If the three chosen people fill three different roles, that is a permutation, and the count is 720, not 120. The calculator shows both numbers, so check which row answers your question. A factorial calculator can confirm the factorial parts of the formula if you want to work it out by hand.
A worked example: choosing 3 out of 10
Take the default example on this page: n = 10, r = 3. Start with the permutation count: 10 × 9 × 8 = 720 ordered picks. Now divide by the number of ways to order 3 items, which is 3! = 3 × 2 × 1 = 6. The combination count is 720 ÷ 6 = 120. That is the main result the calculator shows.
Check it against the symmetry shortcut: C(10, 3) should equal C(10, 7). Choosing 7 out of 10 is 10 × 9 × 8 × 7 × 6 × 5 × 4 ÷ 7!, which is 604,800 ÷ 5,040 = 120. Same answer, as expected — every committee of 3 leaves behind a group of 7, so the two counts have to match.
Now a smaller case: n = 5, r = 2. The permutation count is 5 × 4 = 20, and dividing by 2! = 2 gives C(5, 2) = 10. You can list them: if the five items are A, B, C, D and E, the ten pairs are AB, AC, AD, AE, BC, BD, BE, CD, CE and DE. Ten pairs, no more — and if you try listing them in the other order (BA, CA and so on) you are counting permutations, which is the 20 the calculator shows on the second row.
Where combinations show up in real life
Lotteries are pure combinations. A typical lottery asks you to pick 6 numbers out of 49, and the number of possible tickets is C(49, 6) = 13,983,816. That is why the jackpot is so hard to win: your one ticket is one combination out of nearly fourteen million. The chance of winning is 1 in 13,983,816, which is the combination count turned into a probability.
Card games run on combinations too. A five-card poker hand is a combination of 5 cards out of 52, and there are C(52, 5) = 2,598,960 possible hands. The number of possible four-of-a-kind hands, flushes and full houses are all combination counts, which is why poker odds can be worked out exactly. The order the cards were dealt in does not change the hand, so it is combinations, not permutations.
In quality control, a combination counts the samples. Pulling 5 items out of a batch of 100 for inspection gives C(100, 5) = 75,287,520 possible samples, and the chance that a sample contains a faulty item is a ratio of two combination counts. An average calculator can tell you the mean measurement of the sample, but only combinations tell you how many samples were possible in the first place.
Combination calculator vs permutation calculator
These two tools answer two different questions, and this calculator shows both answers so you can compare them directly. C(n, r) counts groups where order does not matter; P(n, r) counts arrangements where it does. For n = 10, r = 3, the answers are 120 and 720. The ratio is always r! — here 6 — because each group of 3 can be arranged in 6 orders.
Use a combination when the result is a set: a committee, a team, a hand of cards, a lottery ticket, a sample. Use a permutation when the result is a sequence: a ranking, a password, a schedule, a medal order. The test is simple: swap two chosen items. If nothing changed, it is a combination. If the outcome changed, it is a permutation.
The two formulas are linked, and knowing the link means you only have to remember one of them. C(n, r) = P(n, r) ÷ r!, and P(n, r) = n! ÷ (n − r)!. If you can work out the permutation count — start at n and multiply r numbers counting down — then dividing by r! gives the combination count. A probability calculator is the natural next step once you have the counts, because a probability is just a favourable count divided by the total count.
Common combination mistakes
The first mistake is using a combination for a problem where order matters. Awarding gold, silver and bronze among 10 runners is a permutation — 720 ways — not a combination. Using 120 understates the answer by a factor of 6, because each set of three medallists can finish in six different orders. Always ask whether swapping two chosen items changes the outcome.
The second mistake is the reverse: using a permutation for a group problem. Picking a 3-person committee from 10 people is 120 ways, not 720 — the 720 counts every committee six times. This is the more common error, because the permutation formula is the one people remember first.
The third mistake is computing the factorials separately and dividing. For n = 100, 100! is about 9.3 × 10¹⁵⁷, far beyond what a basic calculator displays exactly. Cancel first: C(100, 3) is 100 × 99 × 98 ÷ 6 = 161,700, a calculation that fits in any calculator. This tool computes combinations by iterative multiplication for the same reason — the numbers stay small and exact.
The fourth mistake is forgetting that C(n, r) is symmetric. If r is larger than half of n, work with n − r instead: C(10, 8) is the same as C(10, 2), which is 45, and far easier to compute by hand. The calculator does this automatically, but knowing the trick helps you check its answer.
How to use this combination calculator
Type n, the size of the pool, and r, how many you pick. Both must be whole numbers, with r no larger than n and n no larger than 170. The combination count and the permutation count update live as you type, so you can watch the numbers change as you adjust either input.
Read the main result first: C(n, r), the number of groups. The second row shows P(n, r), the number of ordered arrangements, so you can compare the two and confirm you picked the right one for your question. If a row shows a dash, the inputs are out of range — usually r is larger than n — so adjust them and the results will appear.
Everything runs in your browser. No account, no sign-up, no data sent anywhere. Use it to check homework, to work out lottery odds, or to count the ways to form a team or a sample. If you want to express a count as a share of all possibilities, a percentage calculator does that step, and the formula is shown on this page so you can check the result by hand.