Combination calculator: nCr, the number of ways to choose
A combination is a choice where the order doesn't matter, and the number of ways to choose r things from n is nCr = n! ÷ (r!(n − r)!). Choosing 3 toppings from 8 can be done in 8C3 = 56 ways. This combination calculator is our Permutations and Combinations Calculator: turn off "Order matters", type n and r, and it gives the exact count, however large, with the working and the outcomes listed for small cases.
Permutations and Combinations Calculator
Count arrangements and selections with nPr and nCr
How to use the combination calculator
- Open the Permutations and Combinations Calculator. Under Count, keep Choose r from n.
- Type the number of things in Things to choose from, n and how many you pick in Number chosen, r. Both can go up to 1,000.
- Turn Order matters off. The calculator opens with it on, which counts permutations instead.
- Leave Things can repeat off, unless the same item can be picked more than once.
- Read the number of ways, and the type of count it is. Long answers come with every digit and a digit count.
- Follow the working, and look at the visual: it shows which formula applies and, when there are few enough outcomes, lists them all.
There's also an Arrange a word option, which counts the arrangements of a word with repeated letters, such as MISSISSIPPI. To practise, press Random problem in the Practice section.
The combinations formula
n! (n factorial) is n × (n − 1) × ... × 2 × 1. It is written nCr, C(n, r) or as n over r in brackets, read "n choose r". It is also called a binomial coefficient, because these are the numbers in the binomial expansion.
Combination vs permutation
Ask one question: does the order matter? A team of three is the same team whatever order you pick them in, so that is a combination. Gold, silver and bronze for three runners is different in each order, so that is a permutation. Every combination of r items can be put in r! orders, which links the two:
| Order doesn't matter | Order matters | |
|---|---|---|
| No repeats | Combination: n! ÷ (r!(n − r)!) | Permutation: n! ÷ (n − r)! |
| Repeats allowed | (n + r − 1)! ÷ (r!(n − 1)!) | nʳ |
Worked examples you can check in the calculator
Example 1: 5 choose 3
The calculator opens on n = 5 and r = 3 with order on, giving 5P3 = 5 × 4 × 3 = 60 permutations. Turn order off and it becomes a combination:
There are 10 combinations, which is 60 ÷ 3!: each choice of three was counted 6 times as a permutation. With so few, the calculator lists all 10.
Example 2: choosing pizza toppings
A pizza place offers 8 toppings and you choose 3 different ones. The order you name them doesn't matter, so it is a combination: 8C3 = (8 × 7 × 6) ÷ (3 × 2 × 1) = 336 ÷ 6 = 56. Cancelling like this is quicker than working out 8! in full.
Example 3: lottery odds
In a lottery where you pick 6 different numbers from 1 to 49, the order doesn't matter. There are 49C6 = 13,983,816 possible tickets, so one ticket has a 1 in 13,983,816 chance of matching all six.
Example 4: combinations with repetition
A bakery sells 6 kinds of donut and you buy a box of 4, where you can have more than one of the same kind. Turn on Things can repeat, with order off:
There are 126 different boxes. The calculator shows this as stars and bars: 4 donuts (stars) separated into 6 kinds by 5 dividers (bars), and choosing where the 4 stars go among 9 places.
Example 5: two choices together
A committee needs 2 people from a group of 5 and 3 from a group of 6. Work out each choice separately, then multiply: 5C2 × 6C3 = 10 × 20 = 200 committees. Use the calculator for each part.
Try one
Useful facts about nCr
- Choosing r is the same as leaving out n − r. 10C3 = 10C7 = 120.
- nC0 = nCn = 1: there is one way to choose nothing, and one way to choose everything.
- nC1 = n: n ways to choose one thing.
- The numbers grow fast. 52C5 = 2,598,960, the number of different five-card hands from a pack of 52.
- They make Pascal's triangle. Row n lists nC0, nC1, ..., nCn, and each number is the sum of the two above it.
Common mistakes
- Using a permutation when order doesn't matter. Teams, groups, hands of cards and sets of toppings are combinations.
- Leaving Order matters on in the calculator. It starts on, so turn it off for combinations.
- Mixing up n and r. n is how many there are to choose from, r is how many you choose. r can't be bigger than n without repeats.
- Adding when you should multiply. Two separate choices made together multiply.
- Working out huge factorials in full. Cancel first: 8! ÷ 5! is just 8 × 7 × 6.
Common questions
What is the formula for combinations?
What is the difference between a combination and a permutation?
How do you calculate combinations with repetition?
What does n choose r mean?
Can the calculator handle very large numbers?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Permutations and Combinations Calculator
Count arrangements and selections with nPr and nCr
Open the tool - Test it
Geometry, Algebra 2 & SAT Math
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
AP Statistics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper