Skip to content
SnapCalculations

Permutations vs Combinations: nPr and nCr Explained with Examples

By the SnapCalculations team · Updated 24 Nov 2026

The short answer

Use a permutation when the order of the picks matters, and a combination when it doesn't. Permutations: nPr = n! ÷ (n − r)!. Combinations: nCr = n! ÷ (r! × (n − r)!), which is the permutation count divided by r!.

The one question to ask: does order matter?

Both permutations and combinations count the ways to choose r items from n. The difference is whether the same items in a different order count as a new result.

  • Order matters: permutation. Gold, silver and bronze medals; a PIN code; seating people in a row. Alice-then-Bob is different from Bob-then-Alice.
  • Order doesn't matter: combination. Picking a team, a committee, lottery numbers or pizza toppings. {Alice, Bob} is the same team as {Bob, Alice}.

nPr = n! ÷ (n − r)!

Permutations: ordered picks of r items from n, no repeats

nCr = n! ÷ (r! × (n − r)!)

Combinations: the same picks with order ignored

n! (n factorial) means n × (n − 1) × … × 1, so 5! = 5 × 4 × 3 × 2 × 1 = 120. Every group of r items can be arranged in r! orders, which is why dividing the permutation count by r! gives the combination count.

How to work it out, step by step

  1. 1Find n and r. n is how many items you choose from; r is how many you pick.
  2. 2Decide if order matters. If swapping two picks gives a different outcome, it's a permutation.
  3. 3Decide if items can repeat. A PIN can reuse digits; a team can't include the same person twice.
  4. 4For nPr, multiply r numbers counting down from n. 8P3 = 8 × 7 × 6. The rest of the factorials cancel.
  5. 5For nCr, divide nPr by r!. 8C3 = 336 ÷ (3 × 2 × 1).

You rarely need to work out a huge factorial. Cancel first: 49! ÷ 43! is just 49 × 48 × 47 × 46 × 45 × 44.

When items can repeat

  • Permutations with repetition: nr. Each of the r picks has all n choices, like the digits of a PIN.
  • Combinations with repetition: (n + r − 1)Cr. Used for choices like scoops of ice cream, where you can pick the same flavour twice and order doesn't matter.

Worked examples

Example 1: medals in a race (order matters)

8 runners are in a race. In how many ways can gold, silver and bronze be awarded?

  1. Order matters, because gold is different from silver: n = 8, r = 3.
  2. 8P3 = 8 × 7 × 6 = 336.

Answer: 336 ways

Try it in the calculator

Example 2: a committee (order doesn't matter)

How many different 3-person committees can be chosen from the same 8 people?

  1. Order doesn't matter, so it's a combination.
  2. Start from 8P3 = 336, then divide by 3! = 6 orders for each group.
  3. 8C3 = 336 ÷ 6 = 56.

Answer: 56 committees

Try it in the calculator

Example 3: lottery odds

A lottery draws 6 numbers from 1 to 49. How many different tickets are possible?

  1. Order doesn't matter and numbers can't repeat: 49C6.
  2. 49P6 = 49 × 48 × 47 × 46 × 45 × 44 = 10,068,347,520.
  3. Divide by 6! = 720: 10,068,347,520 ÷ 720 = 13,983,816.

Answer: 13,983,816 tickets, so one ticket has a 1 in 13,983,816 chance of matching all six

Try it in the calculator

Example 4: a 4-digit PIN (repeats allowed)

How many 4-digit PINs can be made from the digits 0–9 if digits can repeat?

  1. Order matters and repeats are allowed: nr.
  2. Each of the 4 positions has 10 choices: 10 × 10 × 10 × 10 = 104 = 10,000.

Answer: 10,000 PINs

Try it in the calculator

Example 5: ice cream scoops (repeats allowed, order doesn't matter)

A shop has 5 flavours. How many different 3-scoop cups are there if you can repeat flavours?

  1. Combination with repetition: (n + r − 1)Cr = (5 + 3 − 1)C3 = 7C3.
  2. 7C3 = (7 × 6 × 5) ÷ (3 × 2 × 1) = 210 ÷ 6 = 35.

Answer: 35 different cups

Try it in the calculator

Common mistakes to avoid

  • Using a permutation for a group. If the result is a team, hand or set, order doesn't matter: use nCr.
  • Forgetting about repeats. PINs, passwords and dice rolls usually allow repeats; people and lottery balls don't.
  • Working out giant factorials. Cancel the matching factors first, or the numbers get out of hand.
  • Mixing up n and r. n is the size of the pool; r is how many you choose, and r can't be bigger than n without repeats.

Check it with the calculator

Enter n and r in our permutation and combination calculator to get nPr and nCr together, with or without repetition, and the cancelled-out working for each. It handles very large answers exactly.

Free, with every step shownOpen the Permutation and Combination Calculator

Frequently asked questions

What is the difference between a permutation and a combination?

A permutation counts ordered arrangements, so ABC and CBA are different. A combination counts groups, so ABC and CBA are the same. For the same n and r, there are always at least as many permutations as combinations.

What is 0! equal to?

0! = 1. That's why nCn = 1 (one way to choose everything) and nC0 = 1 (one way to choose nothing).

How do I calculate nCr on a calculator?

Most scientific calculators have an nCr key (often a second function). Type n, press nCr, type r and press equals. nPr works the same way.

Is a combination lock really a combination?

No. The order of the numbers matters on a lock, so mathematically it's a permutation (usually with repeats allowed).