Ma · Mathematics

When Should You Use nPr or nCr?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the order

    Decide whether switching the selected objects creates a different outcome.

  2. 2. Check replacement

    Determine whether an object can be selected more than once.

  3. 3. Count outcomes

    Use permutations for ordered selections and combinations for unordered selections.

  4. 4. Calculate probability

    For equally likely outcomes, divide the number of favorable outcomes by the total.

The choice between nPrnPr and nCrnCr depends on one question: does changing the order create a different outcome? If it does, count permutations; if it does not, count combinations. For probability questions, you must also check whether selections are made with or without replacement.

The title alone does not specify a particular selection problem or proposed answers to check, so this article gives the counting rules and shows how to apply them to a typical probability question.

The formulas

Suppose you select rr distinct objects from nn distinct objects, without replacement.

The number of ordered selections is

nPr=n!(n−r)!.{}_nP_r = \frac{n!}{(n-r)!}.

The number of unordered selections is

nCr=(nr)=n!r!(n−r)!.{}_nC_r = \binom{n}{r} = \frac{n!}{r!(n-r)!}.

Here, n!n! means n(n−1)⋯2⋅1n(n-1)\cdots 2\cdot 1, and 0!=10! = 1. The two counts are related by

nPr=r!(nr).{}_nP_r = r!\binom{n}{r}.

Every group of rr objects can be arranged in r!r! different orders. That is why the permutation count is larger when r>1r > 1.

Decide whether order matters

Imagine selecting two people from five. If you are forming a committee, choosing Ana and Ben gives the same committee as choosing Ben and Ana. Use a combination. If you are assigning a president and a secretary, those two assignments are different, so use a permutation.

For an ordered pair, the first and second positions are distinct. Thus, selecting object A first and object B second differs from selecting B first and A second. For an unordered pair, those are the same pair.

A useful test is to swap the selected objects. If the result changes, order matters. If nothing about the outcome changes, it does not.

Check whether replacement is allowed

The standard nPrnPr and nCrnCr formulas assume you choose distinct objects, so they apply to selection without replacement. If you select with replacement, an object can be chosen again, and the count changes.

For ordered selections of length rr with replacement, there are nrn^r outcomes. For example, two draws from nn objects have n2n^2 ordered outcomes. If order does not matter and repetition is allowed, the number of multisets is (n+r−1r)\binom{n+r-1}{r}.

Selection ruleOrder mattersOrder does not matter
Without replacementnPr{}_nP_r(nr)\binom{n}{r}
With replacementnrn^r(n+r−1r)\binom{n+r-1}{r}

Worked probability example

A box contains three red balls and two blue balls. Two balls are drawn without replacement. What is the probability that the first ball is red and the second is blue?

Because the question specifies first and second, count ordered pairs. There are five choices for the first ball and four remaining choices for the second, giving

5P2=5⋅4=20{}_5P_2 = 5\cdot 4 = 20

possible ordered outcomes. To meet the condition, the first ball can be any of the three red balls, and the second can be either of the two blue balls. There are 3⋅2=63\cdot 2 = 6 favorable ordered outcomes. Therefore,

P(red, then blue)=620=310.P(\text{red, then blue}) = \frac{6}{20} = \frac{3}{10}.

You can check the result by multiplying the successive probabilities:

P(red, then blue)=35⋅24=310.P(\text{red, then blue}) = \frac{3}{5}\cdot\frac{2}{4} = \frac{3}{10}.

The second denominator is four, not five, because the first ball is not replaced.

Now consider the event that both balls are red. Order is irrelevant to whether both are red, so combinations are convenient. There are (52)=10\binom{5}{2}=10 possible pairs and (32)=3\binom{3}{2}=3 red-only pairs, giving a probability of 3/103/10. You could also count ordered outcomes: 3⋅2=63\cdot2=6 favorable out of 5⋅4=205\cdot4=20, again giving 6/20=3/106/20=3/10.

Common mistakes

  • Using combinations for positions or roles. Assigning two people to different roles is ordered; swapping them changes the assignment.
  • Using permutations when order is irrelevant. If you are choosing a group, counting each possible arrangement counts the same group multiple times.
  • Forgetting replacement. Without replacement, later choices come from fewer objects. With replacement, the original number of choices is available again.
  • Mixing different kinds of outcomes. The favorable count and total count must use the same convention. Do not divide unordered favorable groups by an ordered total.
  • Assuming a count automatically gives a probability. A favorable-to-total ratio works only when the counted elementary outcomes are equally likely. If outcomes have different probabilities, add the probabilities of the favorable outcomes instead.

Before settling on an answer, write down what one outcome means—for example, “a specific first ball and a specific second ball.” Then check whether swapping positions changes that outcome and whether selected objects can repeat. Those decisions determine which counting rule fits.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.