Key takeaways
- Use a permutation when the order of the selected items matters and a combination when it does not.
- P(n, k) = n!/(n − k)! counts ordered selections; C(n, k) = n!/(k!(n − k)!) counts unordered ones.
- P(n, k) = C(n, k) · k!: every combination of k items can be put in k! orders.
- With repetition allowed, ordered selections number nᵏ and unordered ones C(n + k − 1, k).
- Arrangements of letters with repeats divide by the factorial of each repeat count: MISSISSIPPI has 11!/(4! 4! 2!) = 34,650.
When a counting problem asks you to select some items from a larger collection, the first question to settle is: does the order of the chosen items matter? If it does, you are counting permutations. If it does not, you are counting combinations. Get that question right and the formula follows; get it wrong and the answer is off by a factor of k!.
OpenStax's Contemporary Mathematics draws the line the same way: the results of a race and the selection of club officers are permutations because order matters, while a hand of cards is a combination because it does not.
The two formulas
| Permutations | Combinations | |
|---|---|---|
| Counts | Ordered selections of k from n | Unordered selections of k from n |
| Notation | P(n, k), nPk | C(n, k), (n choose k), nCk |
| Formula | n!/(n − k)! | n!/(k!(n − k)!) |
| Same as | n(n − 1)⋯(n − k + 1) | P(n, k)/k! |
Levin's Discrete Mathematics: An Open Introduction derives the relationship directly. To make an ordered selection, first choose which k items to use, C(n, k) ways, then arrange them, k! ways. So
P(n, k) = C(n, k) · k!.
The extra k! in the denominator of C(n, k) is exactly the number of orders that a combination ignores.
The test: swap two items
Imagine you have made a selection. Swap two of the chosen items. Is it a different outcome?
- Gold, silver and bronze from 8 runners. Swapping the gold and silver medallists is a different result. Order matters: P(8, 3) = 8 · 7 · 6 = 336.
- A committee of 3 from 8 people. Swapping two members leaves the same committee. Order does not matter: C(8, 3) = 336/3! = 56.
The two answers differ by 3! = 6, the number of ways to order three people. That factor is the whole difference between the two concepts.
Worked examples
Seating 5 people in a row of 5 chairs. Every arrangement uses everyone, and order matters: P(5, 5) = 5! = 120.
Choosing 2 pizza toppings from 10. Pepperoni-and-mushroom is the same pizza as mushroom-and-pepperoni: C(10, 2) = 45.
President, treasurer and secretary from a club of 20. Distinct roles make order matter: P(20, 3) = 20 · 19 · 18 = 6,840.
A 5-card poker hand from 52 cards. The order you were dealt the cards is irrelevant: C(52, 5) = 2,598,960.
A lottery ticket of 6 numbers from 49. Again unordered: C(49, 6) = 13,983,816. Dividing 1 by this gives the chance of one ticket matching, which is how combinations feed into probability; see conditional probability and Bayes' theorem for where that leads.
When repetition is allowed
So far each item could be chosen at most once. Allowing repetition gives a four-way table.
| Order matters | Order does not matter | |
|---|---|---|
| No repetition | P(n, k) = n!/(n − k)! | C(n, k) |
| Repetition allowed | nᵏ | C(n + k − 1, k) |
- Ordered, with repetition: a 4-digit PIN uses digits 0–9 with repeats allowed and order mattering: 10⁴ = 10,000.
- Unordered, with repetition: choosing 3 scoops from 5 ice-cream flavours, repeats allowed, order irrelevant: C(5 + 3 − 1, 3) = C(7, 3) = 35. This is the stars and bars method.
Arrangements with repeated items
How many different strings can be made by rearranging the letters of MISSISSIPPI? There are 11 letters, but swapping two S's changes nothing. Divide by the number of ways to rearrange each repeated letter among itself:
11!/(4! · 4! · 2! · 1!) = 39,916,800/1,152 = 34,650
(4 I's, 4 S's, 2 P's and 1 M). The same reasoning gives C(n, k) itself: arranging k identical "chosen" markers and n − k identical "not chosen" markers.
Counting errors to avoid
- Using a permutation for a group. Teams, committees and hands are unordered.
- Using a combination when roles differ. Positions such as captain and vice-captain make order matter.
- Forgetting repetition. When repeated characters are allowed, as in the PIN example, the answer is nᵏ, not P(n, k).
- Adding when you should multiply. Independent stages multiply: choosing a 2-person committee from 6 men and another from 5 women gives C(6, 2) · C(5, 2) = 15 · 10 = 150.
- Double-counting overlapping cases. "At least one" problems often need inclusion–exclusion or the complement.
Where the numbers come from
The values C(n, k) form Pascal's triangle, and they are the coefficients in the expansion of (x + y)ⁿ, which is why they are also called binomial coefficients. The binomial theorem guide explains that connection. And if you put more than n objects into n boxes, some box gets two, a counting fact simple enough to state in a line and powerful enough to need its own guide: the pigeonhole principle.
Discrete Math: Study & Quiz has a combinatorics unit with lessons and knowledge checks, plus topic and timed quizzes. It sits with our other education apps; the discrete math hub lists the full counting sequence.
Good to know
Frequently asked questions
What is the difference between a permutation and a combination?
How do I decide whether order matters?
What is the formula for n choose k?
Is a lottery draw a permutation or a combination?
Sources
- Combinations and Permutations (Discrete Mathematics: An Open Introduction, 3rd edition, Oscar Levin) (opens in a new tab)Open Math Books — accessed
- 7.2 Permutations (Contemporary Mathematics) (opens in a new tab)OpenStax — accessed
- 7.3 Combinations (Contemporary Mathematics) (opens in a new tab)OpenStax — accessed
About the author
Reign Creative LLC — The independent app studio that builds the apps covered on this site and publishes every article here. On Google Play it publishes as Reign Collective Apps.
We use AI tools to help research, draft and edit our articles. Each article lists the sources its factual claims rely on, and details about our apps come from their live Google Play listings. No article on this site has been reviewed by an independent expert unless the reviewer is named on it.
No person at Reign Creative LLC has read this article in full. It was published after automated checks and an AI editorial review, which are described in our editorial policy and are not the same as a person reading every sentence.
Spotted an error? Tell us — how corrections are handled is set out in our editorial policy.