Home › Math & Science › Combination Calculator

Combination Calculator

Ten people volunteer and the committee has three seats — how many different committees are possible? This free combination calculator computes nCr (combinations, where order doesn't matter) and nPr (permutations, where it does) with exact arithmetic, so even lottery-sized answers come out digit-perfect.

Example: choosing a committee of 3 from 10 people — n = 10, r = 3. Whole numbers only; r can't exceed n.

120 combinations
C(10, 3) = 120 — if order mattered, there would be 720 permutations
Combinations C(n, r) — order doesn't matter120
Permutations P(n, r) — order matters720
Arrangements of each combination (r!)6

How it works

A combination answers: "how many different groups of r things can I pick from n things?" A permutation answers the slightly different question: "how many ways can I pick and line up r things from n?" The two are linked by a tidy relationship — count the ordered arrangements first, then divide out the r! ways each group could have been listed.

C(n, r) = n! ÷ (r! × (n − r)!)   •   P(n, r) = n! ÷ (n − r)!   •   P(n, r) = C(n, r) × r!

The n input is the size of the pool: people, numbers, cards, toppings. The r input is how many you take at once. If you are handing out distinct roles — president, secretary, treasurer — the order of the pick matters and the permutation figure is the one you want. If the three chosen people are simply "on the committee", use the combination figure; the committee {Ana, Ben, Cy} is one committee, not six.

The calculator does this arithmetic with BigInt, JavaScript's exact whole-number type. That choice matters more than it sounds: ordinary calculator arithmetic silently switches to approximations once answers pass about 16 digits, printing things like 1.2641060643775e14 with the last digits wrong. Here, the multiplication and division are done in the one order that keeps every intermediate value a whole number, so C(50, 25) returns exactly 126,410,606,437,752. The sub-line under the result even tells you how many digits the combination count has, which gives a feel for numbers too big to picture.

Worked example

A club with 10 members elects a committee of 3. How many different committees are possible — and how many ways could the club instead fill three distinct officer roles?

Step 1 — permutations first: P(10, 3) = 10 × 9 × 8 = 720 ordered picks.
Step 2 — divide out the orderings: each committee of 3 can be listed 3! = 6 ways, so C(10, 3) = 720 ÷ 6 = 120.
Step 3 — read the table: 120 combinations, 720 permutations, and the bridge between them, r! = 6.

Type 10 and 3 into the calculator and you get the same three numbers. The gap between them is the whole lesson: order multiplies possibilities fast, which is why a 4-digit PIN (a permutation problem, 10 × 9 × 8 × 7 = 5,040 with no repeats) is much harder to guess than a 4-item selection from 10 (210 combinations).

Common mistakes

Using combinations when the roles differ. Picking a president and a treasurer from 10 people is a permutation question — who gets which job changes the outcome. When in doubt, ask: "if I swap two chosen names, is the result the same?" If not, use nPr.

Assuming choices can't repeat. These formulas are for picking without replacement — each item once. Lottery draws and committees work that way; a padlock code that allows the digit 7 four times does not, and needs a different count (n^r for ordered picks with repeats).

Trusting a rounded answer for big inputs. For C(50, 25), a calculator that prints "126.4106 trillion" has thrown away the exact answer. For odds, audits and homework that gets checked digit by digit, use the exact BigInt result shown here.

FAQ

What is the difference between combinations and permutations?

Order. A combination counts selections where the order doesn't matter — a committee of Ana, Ben and Cy is the same committee however you list them. A permutation counts arrangements where order does matter — Ana, Ben, Cy on a podium is a different result from Cy, Ben, Ana. That is why permutations are always the bigger number: every combination of r people can be arranged r! ways.

How many combinations are there in a 5-from-69 lottery draw?

C(69, 5) = 11,238,513. That is the count of different five-number tickets that can be drawn from 69 numbers when order doesn't matter — and it is why a single ticket's chance of matching all five is 1 in 11,238,513 before any bonus ball is considered. The calculator above reproduces this number exactly: enter 69 and 5.

What is 0 choose 0?

One. There is exactly one way to choose nothing from nothing — the empty selection — and the formula agrees: 0! ÷ (0! × 0!) = 1. The same logic gives C(n, 0) = 1 and C(n, n) = 1 for any n: choosing none of the items, or all of them, can each be done in exactly one way.

Are the results exact for very large numbers?

Yes. This calculator does the arithmetic with BigInt — exact whole-number arithmetic with no rounding at any size — instead of ordinary floating-point numbers, which would start inventing trailing digits once a result passes about 16 digits. C(50, 25) comes out as exactly 126,410,606,437,752, not a rounded “1.2641e14”. The trade-off is a size cap: n can be at most 5,000, because beyond that the exact answers run to thousands of digits.

Why is r not allowed to be bigger than n?

Because you cannot choose more items than there are items. Choosing 5 people from a group of 3 is impossible — there is no selection to count — so the calculator stops and tells you, instead of quietly returning zero or a negative-count curiosity from the factorial formula.

Disclaimer: Results are for education and general use. Check important calculations independently before relying on them for exams, work, or decisions where accuracy matters.