Combination Calculator

Find the number of ways to choose r items from a set of n, where order does not matter.

How it is calculated

Counts unordered selections — choosing a team of 3 from 10 people is a combination problem.

Formula

nCr: n! ÷ (r! × (n−r)!)

What is the Combination Calculator?

When you choose a group and the order inside the group makes no difference, you are counting combinations. The combination calculator finds nCr, read as n choose r: the number of different groups of r items that can be taken from n distinct items.

Picking 5 players for a team from a squad of 15, choosing 3 elective subjects from a list of 8, or selecting 6 numbers on a lottery ticket are all combination problems. The same number nCr also gives the coefficients in the binomial expansion of (a + b)^n and the entries of Pascal's triangle, so it matters well beyond counting. Class 11 students, JEE and CAT aspirants and anyone working on probability use it constantly. The calculator computes the value without forming huge factorials, so it stays accurate for fairly large n.

How to calculate it by hand

1. Identify n, the number of distinct items available, and r, the number to be chosen.

2. Confirm that order does not matter and that each item can be chosen at most once.

3. Use nCr = n! ÷ (r! × (n − r)!).

4. Simplify by using the smaller of r and n − r, since nCr = nC(n − r). For example 20C18 = 20C2.

5. Multiply the top countdown n × (n − 1) × … for that many terms, and divide by the same number of terms counting up from 1.

6. Cancel common factors before multiplying to keep numbers small, then check the answer is a whole number.

Why dividing by r! removes the ordering

Start with nPr, the number of ordered selections of r items. Any single group of r items appears in that count r! times, once for each possible ordering of its members. For example the group {A, B, C} appears as ABC, ACB, BAC, BCA, CAB and CBA. To count each group only once, divide by r!: nCr = nPr ÷ r! = n! ÷ (r! × (n − r)!). This is the whole idea behind the formula.

Symmetry and Pascal's rule

Choosing r items to include is the same as choosing n − r items to leave out, so nCr = nC(n − r). Another identity, nCr = (n − 1)C(r − 1) + (n − 1)Cr, comes from asking whether a particular item is in the group or not. That rule builds Pascal's triangle row by row. The calculator uses the symmetry to shorten its loop and rounds the final value, since floating-point division can leave tiny fractions on what must be a whole number.

Combinations in the binomial theorem and probability

Expanding (a + b)^n means choosing a or b from each of n brackets. The number of ways to pick b exactly r times is nCr, so the coefficient of a^(n−r) b^r is nCr. In probability, nCr counts equally likely outcomes. The chance of a particular 6-number lottery ticket winning from 49 numbers is 1 ÷ 49C6. When items can be chosen more than once, a different formula applies: (n + r − 1)Cr, often called stars and bars.

Worked example, step by step

Sneha's college lets each student pick 4 open electives from a list of 14, and she wonders how many different sets of electives are possible.

Permutations: order matters: nPr = n! ÷ (n − r)! = 14! ÷ 10!

Multiply 4 numbers going down from 14: 14 × 13 × 12 × 11 = 24,024

Combinations: order does not matter, so divide by r!: nCr = nPr ÷ r! = 24,024 ÷ 24 = 1,001

Answer: Combinations, 14C4 1,001; Permutations, 14P4 24,024; Permutations if repeats are allowed 38,416

Common mistakes to avoid

Using combinations for ranked outcomes such as first, second and third, which need permutations.

Forgetting that nCr = nC(n − r) and working out large factorials unnecessarily.

Adding the counts of cases that should be multiplied. Choosing 2 boys from 6 and 3 girls from 5 gives 6C2 × 5C3.

Double counting when a problem says at least one, instead of using the complement: total minus the cases with none.

Applying nCr when items can repeat, such as choosing 3 scoops from 5 flavours with repeats allowed.

Where it is used

Counting teams, committees and panels that can be formed from a group.

Finding binomial coefficients for expansions and the binomial probability distribution.

Calculating lottery, card-hand and sampling probabilities.

Counting the number of handshakes or matches in a round-robin tournament, which is nC2.

Planning test cases that cover every pair or triple of settings in software testing.

Frequently asked questions

Why is nCr always smaller than nPr?

Combinations do not care about the order of the same group, so many different permutations count as just one combination. Dividing by r! removes these repeated orderings.

Loading Gananayantra…