Permutations vs Combinations: Formulas and Worked Examples
Last updated · Part of the Discretiq guides
Permutations and combinations both count the ways to choose items from a set. The difference is a single question: does the order of the chosen items matter? If it does, count permutations. If it does not, count combinations.
Most mistakes come from using the wrong one, so this guide starts with a quick test, then gives the formulas, the four variations involving repetition, and examples you can check yourself.
The one-question test
Imagine you have chosen items A, B and C. Now swap two of them. If the result counts as a different outcome, order matters (permutation). If it is the same outcome, order does not matter (combination).
- Choosing a president, vice-president and treasurer: swapping roles changes the outcome, so permutation.
- Choosing a committee of three: the same three people, so combination.
- A three-digit PIN: 123 and 321 are different PINs, so permutation (with repetition allowed).
- Dealing a five-card hand: the cards in your hand are a set, so combination.
The formulas
For choosing r items from n distinct items, without repetition:
- Permutations: P(n, r) = n! ÷ (n − r)!
- Combinations: C(n, r) = n! ÷ (r! × (n − r)!)
- Link between them: P(n, r) = C(n, r) × r!. Each combination can be arranged in r! orders.
Remember 0! = 1, so C(n, 0) = C(n, n) = 1, and C(n, r) = C(n, n − r).
Example 1: P(10, 3) and C(10, 3)
P(10, 3) = 10 × 9 × 8 = 720. Dividing by the 3! = 6 orderings of each group of three gives C(10, 3) = 720 ÷ 6 = 120.
Example 2: officers versus a committee
A club has 8 members.
| Question | Order matters? | Count |
|---|---|---|
| Choose a president, vice-president and treasurer | Yes | P(8, 3) = 8 × 7 × 6 = 336 |
| Choose a committee of 3 | No | C(8, 3) = 336 ÷ 6 = 56 |
The committee count is smaller by exactly the factor 3! = 6, because 6 different officer line-ups correspond to every committee.
The four cases with and without repetition
Choose r = 2 items from n = 3 types (A, B, C):
| Order matters? | Repeats allowed? | Formula | Count for n = 3, r = 2 |
|---|---|---|---|
| Yes | No | P(n, r) = n!/(n − r)! | 6 (AB, AC, BA, BC, CA, CB) |
| Yes | Yes | nʳ | 9 |
| No | No | C(n, r) | 3 (AB, AC, BC) |
| No | Yes | C(n + r − 1, r) | 6 (AA, AB, AC, BB, BC, CC) |
The last row is the 'ice-cream scoops' case: 2 scoops from 3 flavours, repeats allowed, order irrelevant, gives C(4, 2) = 6.
Arranging items that repeat: MISSISSIPPI
When some of the items are identical, divide out the orderings you cannot tell apart. MISSISSIPPI has 11 letters: M once, I four times, S four times, P twice. The number of distinct arrangements is 11! ÷ (1! × 4! × 4! × 2!) = 34,650.
Large counts in real life
- A 6-from-49 lottery draw, where order does not matter: C(49, 6) = 13,983,816.
- A five-card poker hand from 52 cards: C(52, 5) = 2,598,960.
Common mistakes
- Using P(n, r) when the order does not matter, which over-counts by a factor of r!.
- Forgetting to divide by (n − r)! in the permutation formula, or by r! in the combination formula.
- Treating 'at least' problems as a single combination. Split into cases or count the complement.
- Ignoring repeated items, as in MISSISSIPPI.
- Assuming repeats are impossible. Passwords and PINs usually allow them, so the count is nʳ.
Frequently asked questions
What is the easiest way to remember the difference?
A permutation is an arrangement and a combination is a selection. Locks are really permutation locks; fruit salads are combinations.
Why is C(n, r) always smaller than or equal to P(n, r)?
Because P(n, r) = C(n, r) × r! and r! ≥ 1.
What are nCr and nPr?
They are other notations for C(n, r) and P(n, r), also written with n above r in brackets for combinations.
Try it yourself
Work the examples above by hand first, then confirm your answers.
Check your answers with the free permutation and combination calculatorReferences and further reading
- Rosen, K. H. Discrete Mathematics and Its Applications. McGraw-Hill (standard undergraduate text).
- Graham, R., Knuth, D., Patashnik, O. Concrete Mathematics. Addison-Wesley.