Permutation vs Combination: Lotto Odds and nPr vs nCr

PublishedToolPermutation & Combination Calculator

Contents
  1. The one-second test: switch the order
  2. The second question: can you pick the same thing twice?
  3. Why divide by r!: in numbers
  4. Doing the math by hand, no tool needed
  5. A way to check your answer: the official Donghaeng Lottery odds
  6. When r > n is fine
  7. Wrapping up
  8. Frequently asked questions

This post explains how to tell permutations and combinations apart. A fact-check note flagged one overstated precision on the 3rd-place odds, so all of those figures are now marked as approximate, and the walkthrough states plainly that only 1st and 2nd place divide evenly. Everything else stays as drafted.

When you're not sure whether something is a permutation or a combination, what you need isn't a definition. It's a test you can run. Rearrange what you picked, then ask yourself whether that's a different outcome, and you'll know in a second. Writing 1, 2, 3 on a lottery slip or 3, 2, 1 gives you the same slip, so that's a combination. Passwords 123 and 321 are different values, so that's a permutation.

Summary If switching the order changes the result, it's a permutation (nPr). If it doesn't, it's a combination (nCr). Add one more question — "can I pick the same thing again?" — and you get four cases. Lotto 45C6 = 8,145,060 matches the denominator of the official 1st-place odds from Donghaeng Lottery exactly.

The one-second test: switch the order

Textbooks say that if order matters it's a permutation, and if it doesn't it's a combination. The problem is figuring out whether order matters in your situation. That's why rereading the definition doesn't get you anywhere.

Turn it into something you can actually do and it looks like this. Take what you picked, rearrange the order, and ask whether that's a different outcome than before.

If it's different, it's a permutation. The passwords 1234 and 4321 use the same four digits, but they're completely different passwords. Just swapping positions creates a new case, so the way you count has to reflect order.

If it's the same, it's a combination. Marking 6, 12, 25, 31, 38, 44 on a lottery slip and marking 44, 38, 31, 25, 12, 6 give you the same single slip. Rearranging them doesn't create a new case.

Pick a class president and a vice president and you have a permutation. Cheolsu as president with Younghee as vice president is a different outcome from the reverse. Pick two people from the same five for cleaning duty, though, and you have a combination. Cheolsu and Younghee on duty is the same situation as Younghee and Cheolsu on duty.

The second question: can you pick the same thing twice?

Order alone settles only half of it. The other half is whether repetition is allowed. If you don't ask that question separately, you'll freeze the moment a combination with repetition shows up.

The test is whether what you drew goes back in. In the lottery you draw 6 balls from 45 and the drawn balls don't go back, so there's no repetition. When you build a PIN from the digits 0–9, though, 1111 is allowed, so repetition is.

Put the two axes together and you get four cells, and every counting problem fits in one of them.

No repetitionRepetition allowed
Order mattersPermutation nPr = n!/(n−r)!Permutation with repetition nΠr = n^r
Order doesn't matterCombination nCr = n!/(r!(n−r)!)Combination with repetition nHr = C(n+r−1, r)

Seeing a typical example for each cell with real numbers makes it click.

CellExampleValue
Permutation4-digit password using different digits from 0–910P4 = 5,040
Permutation with repetition4-digit PIN from 0–9 (0000–9999)10^4 = 10,000
Combination6 numbers out of 1–45 (lottery)45C6 = 8,145,060
Combination with repetition4 drinks from 10 kinds (you can order several of the same)10H4 = 715

Permutations with repetition are the easiest. You already know a PIN runs from 0000 to 9999, which is 10,000 of them, and that's exactly 10^4. Each position has 10 choices and they multiply independently, so no factorial is needed. n^r you can do without a calculator.

Why divide by r!: in numbers

Most write-ups never explain where the r! in the denominator of the combination formula comes from. But once you see it, the whole relationship between permutations and combinations makes sense.

Check it with the lottery. If you count order, 45P6 = 5,864,443,200. If you don't, 45C6 = 8,145,060. Divide one by the other and you get exactly 720.

And 720 is 6!. That means a single group of 6 numbers gets counted 720 times over when you count by permutation, once for each order. So you divide by 6! to strip that duplication out. The r! in the denominator of nCr is a division that undoes the multiplier that order added.

Put the other way, a permutation is always r! times larger than the combination. If your answer comes out oddly big, chances are you counted order somewhere you shouldn't have.

Doing the math by hand, no tool needed

All four formulas work by hand as long as you know factorials. n! is n multiplied down to 1. So 5! = 5 × 4 × 3 × 2 × 1 = 120.

The permutation nPr = n!/(n−r)! is really just starting at n and multiplying down r numbers. 5P2 = 5 × 4 = 20. 10P4 = 10 × 9 × 8 × 7 = 5,040. You never have to expand the whole factorial.

The combination nCr takes that result and divides by r!. 5C2 = 20 / 2 = 10. 45C6 = (45 × 44 × 43 × 42 × 41 × 40) / 720 = 8,145,060.

The permutation with repetition nΠr = n^r is pure multiplication. 10^4 = 10,000.

The combination with repetition nHr is solved by turning it into a combination. Since nHr = C(n+r−1, r), 10H4 = 13C4 = (13 × 12 × 11 × 10) / 24 = 715.

With bigger numbers it gets rough by hand. Multiplying six numbers and dividing by 720, like 45C6, is doable on a calculator, but once the digits pile up you get rounding errors along the way. And hand math is a pain when you want to line up all three values and compare them.

Permutation & Combination Calculator

Enter n and r once and the permutation, combination, and combination-with-repetition values show up side by side on one screen, ready to compare

A way to check your answer: the official Donghaeng Lottery odds

So far this has all been explanation. To confirm the combination really is right, you can check it against an official publication.

The Donghaeng Lottery page introducing Lotto 6/45 describes how to play like this: "You win based on how many of the 6 numbers you picked from 1 to 45 match the numbers drawn!" The criterion is how many numbers match. Nothing in that sentence mentions order, so order not mattering follows straight from the wording.

The odds by prize tier that the same page publishes look like this.

TierConditionOfficial odds
1st6 numbers match1/8,145,060
2nd5 numbers + bonus1/1,357,510
3rd5 numbers match1/35,724
4th4 numbers match1/733
5th3 numbers match1/45

Count the total number of cases as a combination and you get 45C6 = 8,145,060. That's exactly the denominator of the 1st-place odds.

Start with the ones that divide cleanly. For 2nd place, 5 of your numbers have to match and the remaining one has to be the single bonus number, so there are only 6 ways. That makes 8,145,060 ÷ 6 = 1,357,510, which matches the official odds exactly. The only tiers where an exact equation holds are 1st (the denominator itself) and 2nd.

The rest check out approximately, because the official odds are rounded. For 3rd place, 5 of your 6 numbers match (6C5 = 6 ways) and the remaining one has to come from the 38 numbers that weren't drawn (38C1 = 38 ways), which gives 228 ways. Then 8,145,060 ÷ 228 = 35,723.9… → about 1/35,724, which is effectively the same as the official odds. For 5th place, 6C3 × 39C3 = 182,780, and 8,145,060 ÷ 182,780 = 44.56 → about 1/45.

Count it as a permutation and you get 45P6 = 5,864,443,200, a number that appears nowhere in the official odds. You don't have to guess which one is right. The official publication is the answer key.

Enter n=45 and r=6 in the Permutation & Combination Calculator and you get 8,145,060 in the combination field and 5,864,443,200 in the permutation field. Only the combination matches the Donghaeng Lottery number. The work shown includes 720, which is 6! — the same 720 from earlier.

We'll stop there. This is a math check, not a word about buying tickets or about strategy.

When r > n is fine

Lots of people memorize "n has to be bigger than r," and that's only half right.

For permutations and combinations it's true. You can't pick 7 people out of 5, so 5P7 and 5C7 don't exist. Enter r > n in the calculator and those two fields show a message.

Combinations with repetition are different. Since what you take out goes back in, you can keep drawing as many as you like. Ordering 5 drinks from 3 kinds is completely normal. 3H5 = C(3+5−1, 5) = 7C5 = 21, and it computes just fine. The moment repetition is allowed, the size relationship between n and r stops being a constraint.

Wrapping up

If changing the order changes the result, it's a permutation. If the result stays the same, it's a combination. Add whether you're allowed to pick the same item again, and you always land in one of four cells.

Only permutations with repetition come out as n^r with no factorials. The other three need factorials. And the r! in combinations is a division that cancels out the extra counting that order created. 45P6 ÷ 45C6 = 720 = 6! shows exactly that.

When you're unsure, the surest method is to line up the three values side by side and pick the one that matches your situation.

Permutation & Combination Calculator

Enter n and r once and the permutation, combination, and combination-with-repetition values show up side by side on one screen, ready to compare

Frequently asked questions

Which is always bigger, a permutation or a combination?

A permutation is always r! times bigger than a combination. That's because a permutation counts the same group r! times, once for each ordering. 45C6 = 8,145,060 and 45P6 = 5,864,443,200, and if you divide them you get exactly 720 = 6!. If your result came out much larger than you expected, check whether you counted order where you shouldn't have.

Why is the formula for combinations with repetition nHr equal to C(n+r−1, r)?

If the formula is hard to memorize, it's enough to remember "turn it into a combination where you pick r out of n+r−1." With 4 drinks out of 10 kinds, 10H4 = C(10+4−1, 4) = 13C4 = 715. It reduces to a combination calculation, so you don't need a separate new method.

Can I still calculate when r is bigger than n?

Only for combinations with repetition. Permutations and combinations don't put back what you picked, so you can't pick 7 people out of 5, and the case doesn't exist. Combinations with repetition, on the other hand, put items back and pick again, so something like 5 drinks out of 3 kinds is normal. 3H5 = 7C5 = 21.

Is the number of 4-digit password possibilities 5,040 or 10,000?

It depends on the conditions. If you can use the digits 0–9 freely and repeat them like 1111, that's a permutation with repetition, so 10^4 = 10,000. A real PIN runs from 0000 to 9999, so this is the one that fits. If instead all four digits have to be different, that's a permutation, so 10P4 = 10 × 9 × 8 × 7 = 5,040. This is a classic case where you have to check first whether repetition is allowed.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. Dog Age in Human Years: ×7 Is Wrong, 3 Methods Used NowWhy multiplying a dog's age by 7 doesn't hold up, plus the two formulas used today and why they disagree: 15 vs 31 at age 1, 102 vs 74 at 15.
  2. Dog Food Portion Calculator: RER & DER Formulas ExplainedLearn how to turn your dog's weight into daily calories with the RER and DER formulas, then convert that into grams and cups of food.
  3. Poker Outs Calculator: Exact Odds Instead of the 4-2 RuleCount your poker outs, then turn them into exact turn and river odds by checking every remaining card combination, not the 4-2 estimate.
  4. Portfolio rebalancing formula: how much to buy or sellUse the rebalancing formula to find how much to buy or sell for each asset, check that your target weights add up to 100%, and include new cash.
  5. Early/Late Installment Savings Calculator: 6-1-5 Rule DatesSee how the 6-1-5 (and 1-11) rule turns each installment's early or late payment days into a real maturity date, plus pre-tax and after-tax interest.
  6. Pregnancy Week Calculator: How the Due Date Math WorksSee the exact due date and week-count math behind a pregnancy calculator: the 280-day rule, the divide-by-7 step, and how to check your results.

Related tools