Permutations and combinations are two ways of counting how many outcomes a selection can produce. The single question that separates them is simple: does the order of the chosen items matter? If swapping two items gives a genuinely different result, you are counting permutations. If a swap leaves you with the same group, you are counting combinations.

Both are built on the factorial, where n!=n×(n1)××2×1n! = n \times (n-1) \times \cdots \times 2 \times 1 and 0!=10! = 1 by convention.

The two formulas

For choosing rr items from nn distinct items:

nPr=n!(nr)!,nCr=(nr)=n!r!(nr)!{}^{n}P_{r} = \frac{n!}{(n-r)!}, \qquad {}^{n}C_{r} = \binom{n}{r} = \frac{n!}{r!\,(n-r)!}

The permutation count nPr{}^{n}P_{r} treats two arrangements with the same members but different order as distinct. The combination count nCr{}^{n}C_{r} treats them as the same. The only difference between the formulas is the extra r!r! in the denominator of nCr{}^{n}C_{r} — and that single factor carries the entire "order matters / order doesn't" distinction.

When to use which

Use this decision rule before reaching for either formula:

Situation Order matters? Use
Ranking finishers 1st/2nd/3rd in a race Yes nPr{}^{n}P_{r}
Assigning distinct roles (president, treasurer) Yes nPr{}^{n}P_{r}
Forming a PIN or password from distinct digits Yes nPr{}^{n}P_{r}
Choosing a committee with equal members No nCr{}^{n}C_{r}
Dealing a hand of cards No nCr{}^{n}C_{r}
Picking lottery numbers No nCr{}^{n}C_{r}

A quick test: rename the chosen items as "Group A." If a different seating, ranking, or labeling of the same people changes the answer, order matters → permutation. If only who is in Group A matters, order does not → combination.

Why the combination formula has that extra r!r! — a derivation

Start from permutations. To arrange rr items chosen from nn, fill rr slots in turn: the first slot has nn choices, the next n1n-1, down to nr+1n-r+1 choices for the last slot. Multiplying gives

nPr=n(n1)(nr+1)=n!(nr)!{}^{n}P_{r} = n (n-1)\cdots (n-r+1) = \frac{n!}{(n-r)!}

Now notice that every combination of rr items can itself be arranged internally in r!r! different orders, and each of those orders is a separate permutation. So the permutations are exactly the combinations counted r!r! times over:

nPr=nCr×r!{}^{n}P_{r} = {}^{n}C_{r} \times r!

Dividing both sides by r!r! isolates the combination count:

nCr=nPrr!=n!r!(nr)!{}^{n}C_{r} = \frac{{}^{n}P_{r}}{r!} = \frac{n!}{r!\,(n-r)!}

That is the whole story: a combination is a permutation with the internal orderings collapsed, and dividing by r!r! does the collapsing.

Worked example 1 (permutation): a race podium

Eight runners compete. How many distinct ways can the gold, silver, and bronze medals be awarded?

Order matters — gold for runner A and silver for runner B is different from the reverse. So use 8P3{}^{8}P_{3}:

8P3=8!(83)!=8!5!=8×7×6=336{}^{8}P_{3} = \frac{8!}{(8-3)!} = \frac{8!}{5!} = 8 \times 7 \times 6 = 336

There are 336 possible podiums. The slot-filling logic confirms it directly: 88 choices for gold, 77 for silver, 66 for bronze.

Worked example 2 (combination): a committee

From the same 88 people, how many ways can a committee of 33 (all equal members) be formed?

Order does not matter — a committee of {A, B, C} is identical to {C, B, A}. Use 8C3{}^{8}C_{3}:

8C3=8!3!(83)!=8×7×63×2×1=3366=56{}^{8}C_{3} = \frac{8!}{3!\,(8-3)!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = \frac{336}{6} = 56

There are 56 committees. Notice the answer is exactly the permutation result 336336 divided by 3!=63! = 6, which is the r!r! factor in action: each committee was over-counted 66 times by the permutation, once for each ordering of its three members.

Practice

Try these before checking the answers below.

  1. A password uses 44 different digits from 0099, and order matters. How many are possible?
  2. A pizza shop has 77 toppings; you pick 33 different ones. How many topping sets?
  3. In how many ways can 55 distinct books be arranged on a shelf?

Answers: (1) 10P4=10!6!=5040{}^{10}P_{4} = \dfrac{10!}{6!} = 5040. (2) 7C3=7!3!4!=35{}^{7}C_{3} = \dfrac{7!}{3!\,4!} = 35. (3) 5P5=5!=120{}^{5}P_{5} = 5! = 120.

Calculation traps to avoid

  • Choosing the wrong formula. The most common error is using nCr{}^{n}C_{r} when order matters (or vice versa). Always run the "does a swap change the answer?" test first.
  • Forgetting 0!=10! = 1. When r=nr = n, the denominator includes (nr)!=0!=1(n-r)! = 0! = 1, not 00. Setting 0!=00! = 0 breaks the formula.
  • Mixing up nn and rr. The total pool is nn; the number chosen is rr, with rnr \le n. 8P3{}^{8}P_{3} is not the same as 3P8{}^{3}P_{8} (the latter is undefined).
  • Cancelling factorials carelessly. 8!5!\frac{8!}{5!} is 8×7×68\times 7\times 6, not 85\frac{8}{5}. Expand only down to where the smaller factorial cancels.
  • Ignoring repeated items. When some items are identical (like the three A's in "BANANA"), divide the total permutations by the factorial of each repeat group, or you will over-count distinct arrangements.

The fastest way to stop confusing these two is to internalize the relationship nPr=nCr×r!{}^{n}P_{r} = {}^{n}C_{r}\times r! — every combination question is just a permutation question with the ordering divided back out.

Frequently Asked Questions

What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, so swapping two items gives a different outcome. A combination counts selections where order does not matter. The formulas differ only by an extra factor of r! in the denominator of the combination.
When should I use nPr instead of nCr?
Use nPr when order matters, such as ranking finishers, assigning distinct roles, or building a PIN from distinct digits. Use nCr when only the group membership matters, such as choosing a committee, dealing a hand, or picking lottery numbers.
How are nPr and nCr related?
They satisfy nPr = nCr times r!. Every combination can be internally arranged in r! orders, and each order is a separate permutation, so dividing the permutation count by r! gives the combination count.
Why is 0! equal to 1?
Defining 0! = 1 keeps the formulas consistent. For example, when r = n the denominator contains (n - r)! = 0!, and only 0! = 1 makes nCn equal to 1, which is the correct count of choosing all items in exactly one way.
How do I count arrangements when some items are identical?
Take the total factorial of all items and divide by the factorial of each repeated group. For the word BANANA with three A and two N, the count is 6! / (3! 2!) = 60 distinct arrangements.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →