Combination Calculator (nCr)
A combination counts the ways to choose r items from n when order does not matter: C(n, r) = n! ÷ [r! × (n − r)!]. For n = 10 and r = 3 there are 120 combinations, or 220 if items can be repeated.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is a Combination?
A combination is a selection of items in which the order is irrelevant. Choosing the toppings for a pizza, a five-card poker hand or the members of a jury are all combinations: the same set of items is the same selection however you list it.
The count of combinations, written C(n, r), nCr or “n choose r”, is also called the binomial coefficient, because it appears as the coefficients when you expand (a + b)ⁿ. It is the central counting tool of probability and statistics, and it is the first factor in the binomial probability formula.
Without and With Repetition
| No repetition | Repetition allowed | |
|---|---|---|
| Each item can be chosen | At most once | Any number of times |
| Formula | C(n, r) = n! ÷ [r!(n − r)!] | C(n + r − 1, r) |
| Example: 3 from 10 | 120 | 220 |
| Typical use | Committees, lottery numbers, card hands | Scoops of ice cream, coin multisets, donut boxes |
Combination Formulas
nis the number of distinct types of item available.ris the number you choose.!denotes factorial, the product of all whole numbers up to that number.- Dividing by
r!removes the duplicates created by different orderings of the same set.
Because C(n, r) = C(n, n − r), you can always use the smaller of r and n − r to keep the arithmetic short. For example, C(100, 98) = C(100, 2) = 4,950.
Worked Example: Choosing 3 from 10
No repetition
- C(10, 3) = 10! ÷ (3! × 7!).
- Cancel 7!: 10 × 9 × 8 ÷ (3 × 2 × 1) = 720 ÷ 6.
- C(10, 3) = 120.
With repetition
Imagine ordering three scoops from ten flavours, where you may repeat a flavour.
- Use C(n + r − 1, r) = C(12, 3).
- 12 × 11 × 10 ÷ 6 = 1,320 ÷ 6 = 220.
There are 220 different multi-scoop orders but only 120 if every scoop must be a different flavour.
Other Combinations Worth Knowing
| Selection | Count |
|---|---|
| A 5-card poker hand from 52 cards, C(52, 5) | 2,598,960 |
| Six lottery numbers from 49, C(49, 6) | 13,983,816 |
| A 2-person pair from 5 people, C(5, 2) | 10 |
| Number of handshakes among 10 people, C(10, 2) | 45 |
The handshake case shows combinations hiding in everyday questions: each handshake is an unordered pair, so a room of 10 people produces 45 handshakes.
Pascal’s Triangle and Subsets
The values C(n, r) form Pascal’s triangle, where each entry is the sum of the two above it. Row 4 reads 1, 4, 6, 4, 1, and C(5, 2) = 10 = 4 + 6. These are also the coefficients in the expansion of (a + b)⁴. Adding a whole row gives 2ⁿ, the total number of subsets of an n-item set, so a 10-item set has 2¹⁰ = 1,024 possible subsets, from the empty set to the full one.
How to Use This Combination Calculator
- Enter the total number of items n.
- Enter the number chosen r.
- Pick No repetition for a standard nCr, or Repetition allowed if items can be chosen more than once.
- Read C(n, r), the formula used and the matching count of ordered arrangements.
If the order of the selection matters, switch to the permutation calculator, or use the permutation and combination calculator to see both figures together.
Real-World Uses of Combinations
- Games and lotteries: working out the odds of a given hand or ticket.
- Statistics: binomial and hypergeometric probabilities are built from combinations. See the hypergeometric calculator.
- Team and committee selection: counting the possible groups of a given size.
- Experiment design: choosing which subjects or items go into each test group.
- Networks: the number of possible connections between n nodes is C(n, 2).
What Are the Most Common Mistakes With the Combination Calculator (nCr)?
- Using combinations when order matters. A PIN code or race result needs permutations.
- Setting r greater than n. Without repetition, this has no solutions.
- Mixing up n and r in the repetition formula. It uses n + r − 1, not n + r.
- Forgetting the symmetry shortcut. Computing C(100, 98) directly is needlessly hard compared with C(100, 2).
- Treating identical items as distinct. Combinations assume every item is different.
- Large values. Combinations grow quickly, and very large results appear in scientific notation.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is the combination formula?
C(n, r) = n! ÷ [r! × (n − r)!]. It counts how many ways r items can be chosen from n when order does not matter.
What is the difference between nCr and nPr?
nCr ignores order and nPr counts order. They are related by nPr = nCr × r!.
How do combinations with repetition work?
When items can be chosen repeatedly, the count is C(n + r − 1, r). For 3 scoops from 10 flavours it is C(12, 3) = 220.
What does “n choose r” mean?
It is another way to say C(n, r), the number of ways to choose r items from a set of n.
Why is C(n, 0) equal to 1?
There is exactly one way to choose nothing from a set: the empty selection. The formula agrees because 0! = 1.
How many handshakes occur among n people?
C(n, 2) = n(n − 1) ÷ 2, because each handshake is an unordered pair. For 10 people that is 45.