What the Permutation and Combination Calculator does
Permutations and combinations count the ways to choose r items from n. In a permutation the order matters, as with medal positions or PIN codes; in a combination it does not, as with a team or a lottery ticket. The Permutation and Combination Calculator gives both, with or without repetition, as exact whole numbers however large, with the formula worked out for your numbers.
How to use it
- Enter n, the number of items to choose from.
- Enter r, the number you choose.
- Tick “Items can be repeated” if the same item can be chosen more than once.
- Read nCr and nPr.
Example
Choosing 3 of 10 people gives 10C3 = 120 possible groups, but 10P3 = 720 ordered line-ups, since each group can be ordered in 3! = 6 ways. A 5-card hand from a 52-card deck can be any of 52C5 = 2,598,960 combinations.
The formulas
nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! × (n − r)!). With repetition allowed, there are nʳ ordered arrangements, as with a 4-digit PIN, 10⁴ = 10,000, and C(n + r − 1, r) unordered selections, such as choosing 3 scoops from 5 ice-cream flavours, which gives 35.
A quick test for which one you need: if swapping two chosen items gives a different result, as with first and second place, it is a permutation. If it gives the same result, as with two people on a committee, it is a combination.
Worked examples
| Question | Formula | Answer |
|---|---|---|
| Pick 3 people from 10 for a team | 10C3 | 120 |
| Award gold, silver and bronze among 10 | 10P3 | 720 |
| Choose 2 from 5 | 5C2 | 10 |
| Arrange 5 books on a shelf | 5! | 120 |
| A 4-digit PIN, digits can repeat | 10⁴ | 10,000 |
| Lottery: 6 numbers from 49 | 49C6 | 13,983,816 |
| 5-card poker hands | 52C5 | 2,598,960 |
Ask whether order matters. If swapping two chosen items gives a different result, as with medals, use nPr. If not, as with a team, use nCr. For a single factorial, or very large ones, use the Factorial Calculator, and for the chance of an outcome, the Probability Calculator.
Questions people ask
Is anything I enter sent anywhere?
No. The calculator works entirely in your browser, so your numbers stay on your device.
Is a combination lock a combination?
No, despite the name. The order of the numbers matters, so it is really a permutation with repetition.
What is 0! and why is nC0 equal to 1?
0! is defined as 1, so there is exactly one way to choose nothing: n! ÷ (0! × n!) = 1.
How many ways can I arrange the letters of a word?
For n different letters, n!: 5 letters give 120 arrangements. With repeated letters, divide by the factorial of each repeat: BOOK gives 4! ÷ 2! = 12.
What do nPr and nCr mean?
n is how many items there are and r how many you take. nPr counts ordered arrangements, nCr counts selections where order does not matter.