Combinations Calculator (nCr)
Type how many items there are and how many to choose to count the groups…
Type how many items there are and how many to choose to count the groups, with every group listed when there are few enough to show.
ExampleCombinations, 5C3
10
There are 10 ways to choose 3 of 5 when order doesn’t matter. If order mattered there would be 60.
Type your own n and r.
All 10, with the items named A, B, C, D…:
- ABC
- ABD
- ABE
- ACD
- ACE
- ADE
- BCD
- BCE
- BDE
- CDE
- If order mattered
- 60
- Digits
- 2
How this works: 9 sources,
How this works
Method
A combination is a choice where order doesn’t matter: a hand of cards, a committee, the toppings on a pizza. The number of ways to choose r items from n is C(n, r) = n! ÷ (r! × (n − r)!), read “n choose r”. Choosing 3 of 5 people gives 5 × 4 × 3 ÷ (3 × 2 × 1) = 10 groups. Full method
Sources
- Wikipedia, Combination
- Wikipedia, Lottery mathematics
- NIST/SEMATECH e-Handbook of Statistical Methods
- Abramowitz and Stegun, Handbook of Mathematical Functions, chapters 6, 7 and 26 (1964)
- SciPy 1.18 scipy.stats (reference values for the tests)
- statsmodels 0.15 (reference values for the A/B test and regression intervals)
- Welch, The generalization of Student’s problem when several different population variances are involved (Biometrika) (1947)
- Fleiss, Levin and Paik, Statistical Methods for Rates and Proportions, 3rd edition (sample size for two proportions) (2003)
- Hyndman and Fan, Sample quantiles in statistical packages (The American Statistician) (1996)
How it’s tested
2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: live curves with draggable cut-offs, and tests on pasted data (t-tests, ANOVA, chi-square, Fisher’s exact, correlation, regression, A/B), checked against SciPy.
How to count combinations
A combination is a choice where order doesn’t matter: a hand of cards, a committee, the toppings on a pizza. The number of ways to choose r items from n is C(n, r) = n! ÷ (r! × (n − r)!), read “n choose r”. Choosing 3 of 5 people gives 5 × 4 × 3 ÷ (3 × 2 × 1) = 10 groups.
The formula counts the ordered arrangements (5 × 4 × 3 = 60) and divides by the 3! = 6 orders each group can come in, since ABC, ACB, BAC and the rest are the same group. A five-card poker hand from a 52-card deck is C(52, 5) = 2,598,960 hands, and a 6-from-49 lottery ticket is one of C(49, 6) = 13,983,816.
When repeats are allowed (choosing 3 scoops from 5 flavours, where two scoops can be the same), the count is C(n + r − 1, r), which for 3 from 5 is C(7, 3) = 35. Every answer here is an exact whole number, however large.
C(n, r) = n! ÷ (r!(n − r)!) · with repeats C(n + r − 1, r)
- There are C(52, 5) = 2,598,960 different five-card poker hands. Source: Wikipedia, Combination.
- A 6-from-49 lottery has C(49, 6) = 13,983,816 possible tickets, so one ticket’s chance of the jackpot is 1 in 13,983,816. Source: Wikipedia, Lottery mathematics.
Combinations people look up
How many ways to choose r items from n when order doesn’t matter.
| Choice | n | r | Combinations |
|---|---|---|---|
| Pairs from 6 people | 6 | 2 | 15 |
| 3 of 5 people | 5 | 3 | 10 |
| A committee of 4 from 10 | 10 | 4 | 210 |
| Half of 20 | 20 | 10 | 184,756 |
| A 5-card hand | 52 | 5 | 2,598,960 |
| A 6-from-49 lottery ticket | 49 | 6 | 13,983,816 |
| A 13-card bridge hand | 52 | 13 | 635,013,559,600 |
| 3 toppings from 12 | 12 | 3 | 220 |
| 5 numbers from 69 | 69 | 5 | 11,238,513 |
| Teams of 11 from 23 | 23 | 11 | 1,352,078 |
Common questions
What is the difference between combinations and permutations?
Order. A combination counts groups (ABC is the same as CBA); a permutation counts arrangements (ABC and CBA are different). There are always r! times as many permutations as combinations.
Why is C(n, r) the same as C(n, n − r)?
Choosing which r to take is the same as choosing which n − r to leave out. C(10, 3) and C(10, 7) are both 120.
What is C(n, 0)?
It is 1: there is exactly one way to choose nothing. And 0! is defined as 1 so that the formula agrees.