Permutation vs Combination: The Difference, With Formulas and Examples
By Shihab Mia July 3, 2026 8 min read
Quick answer
A permutation counts ordered arrangements, and a combination counts unordered selections. Order matters for permutations but not for combinations. The permutation formula is nPr = n! / (n - r)! and the combination formula is nCr = n! / (r! (n - r)!). Because permutations count every ordering separately, nCr is always less than or equal to nPr for the same n and r.
Permutations and combinations both answer "how many ways?" questions, but they answer different ones. The single test that separates them is whether the order of your chosen items changes the outcome. If rearranging the same items gives you a new valid result, you want a permutation. If rearranging changes nothing, you want a combination.
Pick 2 letters from the set {A, B, C}. There are 6 permutations (AB, BA, AC, CA, BC, CB) because AB and BA are different orderings. There are only 3 combinations (AB, AC, BC) because AB and BA are the same selection. That single example captures the whole idea, and everything below just makes it precise.
What is the difference between a permutation and a combination?
A permutation is an ordered arrangement of items, and a combination is an unordered selection of items. In a permutation, swapping two items produces a different result; in a combination, it produces the same result. That is the entire distinction, and it drives which formula you use.
A helpful shortcut: the word "combination" in everyday speech is misleading. A "combination lock" is really a permutation lock, because 1-2-3 opens it and 3-2-1 does not. In mathematics the terms are precise, so always ask the order question rather than relying on the common word.
Permutation vs combination at a glance
| Feature | Permutation | Combination |
|---|---|---|
| Does order matter? | Yes | No |
| Counts | Ordered arrangements | Unordered selections |
| Formula | nPr = n! / (n - r)! | nCr = n! / (r! (n - r)!) |
| Relative size | Always greater than or equal to nCr | Always less than or equal to nPr |
| Typical words | arrange, order, rank, sequence, schedule | choose, select, pick, group, committee |
| Example | Finishing positions in a race | Which players make the team |
What are the permutation and combination formulas?
Both formulas start from the same building block, the factorial. The factorial of n, written n!, is the product of every whole number from 1 up to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. By definition 0! = 1, which keeps the formulas working at their edges.
Permutation formula
The number of ways to arrange r items chosen from n distinct items, where order matters, is nPr = n! / (n - r)!. Dividing by (n - r)! removes the arrangements of the items you did not choose, leaving only the ordered arrangements of the r you did.
Combination formula
The number of ways to select r items from n distinct items, where order does not matter, is nCr = n! / (r! (n - r)!). It is the permutation count divided by r!, because each unordered selection of r items can be ordered in r! ways. In symbols, nCr = nPr / r!. That single relationship is the cleanest way to remember how the two connect.
The one relationship to memorize
nCr = nPr / r! Every combination hides r! permutations inside it. Divide the permutation count by r! and you strip out the ordering, which is exactly what a combination ignores.
How do you calculate a permutation? A worked example
Suppose 8 runners enter a race and you want to count how many ways the gold, silver, and bronze medals can be awarded. Order matters here, because first place and second place are different outcomes, so this is a permutation with n = 8 and r = 3.
- Identify n and r. Here n = 8 runners and r = 3 medal positions.
- Write the formula: nPr = n! / (n - r)! = 8! / (8 - 3)! = 8! / 5!.
- Cancel the shared factorial. 8! / 5! = 8 x 7 x 6, because the 5! in the numerator and denominator cancel.
- Multiply the remaining terms: 8 x 7 x 6 = 336.
- Interpret the result: there are 336 different ways to award gold, silver, and bronze among 8 runners.
Now change the question. Suppose you just want to know how many ways 3 of those 8 runners could be picked for a random drug test, where the order of selection is irrelevant. That is a combination: nCr = 8! / (3! x 5!) = 336 / 6 = 56. Same n and r, but dividing by 3! = 6 collapses the 336 ordered arrangements into 56 unordered groups. This side-by-side pair is the clearest proof that nCr is always less than or equal to nPr.
How do you calculate a combination? A worked example
A classic combination question is the poker hand: how many different 5-card hands can be dealt from a standard 52-card deck? Order does not matter, because the same five cards form the same hand no matter what sequence they arrive in, so this is a combination with n = 52 and r = 5.
- Identify n and r. Here n = 52 cards and r = 5 cards in a hand.
- Write the formula: nCr = n! / (r! (n - r)!) = 52! / (5! x 47!).
- Cancel the 47! against the top of 52!, leaving nCr = (52 x 51 x 50 x 49 x 48) / 5!.
- Evaluate the numerator: 52 x 51 x 50 x 49 x 48 = 311,875,200.
- Divide by 5! = 120: 311,875,200 / 120 = 2,598,960.
- Interpret the result: there are 2,598,960 distinct 5-card poker hands.
That 2,598,960 figure is the reason poker odds work out the way they do, and it is a number you can confirm on any combinatorics reference. If instead you cared about the order the cards were dealt, you would use the permutation nPr = 52! / 47! = 311,875,200, which is exactly 120 times larger because each hand can be dealt in 5! = 120 orders. Same cards, but the ordering question multiplies the count by r!.
When should you use each one?
Use a permutation when different orderings count as different outcomes, and use a combination when they do not. Reading the wording of a problem carefully almost always tells you which applies. The verbs and nouns are strong hints.
- Use permutations for: seating arrangements, race finishes, rankings, passwords and PINs, forming ordered schedules, assigning distinct roles (president, treasurer, secretary), and lining people up in a row.
- Use combinations for: choosing a committee, dealing a poker hand, selecting lottery numbers, picking a subset of toppings, forming a team, and any "how many groups" question where the members are interchangeable.
A reliable test: after you make a selection, ask "if I shuffle these chosen items, is it still the same answer?" If yes, it is a combination. If shuffling creates a genuinely new outcome, it is a permutation. For deeper reference on the underlying counting principles, the Wolfram MathWorld entry on permutations is a solid authoritative source.
Common mistakes to avoid
Most errors with permutation vs combination come from misreading whether order matters or from mishandling the formula. Watch for these traps.
- Trusting the everyday word "combination." A combination lock cares about order, so it is mathematically a permutation. Judge by the order question, not the label.
- Forgetting to divide by r!. If you compute a permutation when the problem calls for a combination, your answer is r! times too large. For r = 3 that means it is 6 times too big.
- Confusing "selection" with "arrangement." "How many teams" is a combination; "how many ways to line them up" is a permutation. The same people, different question.
- Assuming items are distinct when they repeat. Standard nPr and nCr assume all n items are different. Repeated items, or selecting with replacement, need adjusted formulas.
- Mishandling 0!. Remember 0! = 1, not 0. This matters whenever r = n, where nPr = n! and nCr = 1.
Counting problems sit alongside other everyday math skills. If you are brushing up, our guides on how to calculate an average and what a logarithm is pair well with this topic, and the logarithm calculator handles the factorial-adjacent exponent work when numbers get large.
What about permutations and combinations with repetition?
The nPr and nCr formulas above assume you choose without replacement, so no item can be picked twice. Some problems allow repetition, and those need different formulas. A 4-digit PIN, for example, lets you reuse digits (1-1-1-1 is valid), so it is a permutation with repetition, not standard nPr. Getting this wrong is one of the most common ways a correct method still lands on the wrong number.
The four counting cases
| Order matters? | Repetition allowed? | Formula | Example |
|---|---|---|---|
| Yes | No | nPr = n! / (n - r)! | Awarding gold, silver, bronze |
| Yes | Yes | n to the power r | A 4-digit PIN from 10 digits |
| No | No | nCr = n! / (r! (n - r)!) | Dealing a 5-card hand |
| No | Yes | (n + r - 1)! / (r! (n - 1)!) | Scooping 3 ice-cream flavors |
The bottom-right case, unordered selection with repetition, is the stars and bars formula, and it is the one people forget exists. If you can pick the same item more than once and order does not matter, reach for it instead of nCr. When in doubt, ask both questions before choosing a formula: does order matter, and can items repeat?
Good to know: factorials grow fast
Both formulas rely on factorials, and factorials explode in size. 10! is already 3,628,800, and 20! is over 2.4 quintillion. This is why real permutation and combination counts become huge quickly, and why a calculator is worth using once n climbs past single digits. It is also why lotteries can have such long odds: selecting 6 numbers from 49 gives 49C6 = 13,983,816 possible combinations, a real figure you can verify with any combinatorics tool.
If you want to skip the arithmetic entirely and just get a reliable answer, use the calculator below. Enter n and r, choose whether order matters, and it returns the exact count.
๐ข Try the free tool Permutation and Combination Calculator Free permutation calculator for nPr, nCr and n!. Enter n and r to get permutations, combinations and the factorial instantly, with formulas and worked steps.The whole subject reduces to one honest question: does order matter? Answer that, pick nPr for yes and nCr for no, plug in n and r, and you will get the right count every time. Once the pattern clicks, permutation vs combination stops being a memorization exercise and becomes a quick decision you make on sight.
Frequently asked questions
Is a lottery a permutation or a combination?
A standard lottery draw is a combination, because the order the numbers are drawn does not matter, only which numbers come up. For a 6 from 49 lottery, the count is 49C6 = 13,983,816 possible combinations. If order did matter, it would instead be a much larger permutation count.
Why is nCr always smaller than nPr?
Because nCr = nPr / r!, and r! is at least 1. Every unordered combination of r items can be arranged in r! different orders, so permutations count each selection r! times while combinations count it once. Dividing by r! removes those duplicate orderings, making the combination count smaller or equal.
Does a combination lock use permutations or combinations?
Mathematically it uses permutations, despite the name. A combination lock only opens for the correct sequence in the correct order, so 1-2-3 and 3-2-1 are different outcomes. Because order changes the result, it fits the permutation definition, not the combination one.
What is nPr when r equals n?
When r = n, the formula gives nPn = n! / (n - n)! = n! / 0! = n! / 1 = n!. In plain terms, arranging all n distinct items in order can be done in n! ways. For 4 items that is 4! = 24 arrangements, and for 5 items it is 5! = 120.
How do I decide which formula to use quickly?
Ask one question: if I rearrange the chosen items, is it a different answer? If yes, order matters and you use the permutation formula nPr = n! / (n - r)!. If no, order does not matter and you use the combination formula nCr = n! / (r! (n - r)!). The wording usually signals it too.
Can permutations or combinations repeat items?
The standard nPr and nCr formulas assume distinct items chosen without replacement. If items can repeat, you need different formulas: permutations with repetition use n to the power r, and combinations with repetition use a separate stars and bars formula. Always check whether repetition is allowed before choosing your formula.