letx=

Probability and statistics

Permutations

The number of ways to choose r items from n when the order matters, such as podium places or PIN-style codes without repeats.

P(n,r)=n!(n−r)!

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

What the symbols mean

Pn,r
the number of ordered arrangements, also written _nPr
n
the number of items to choose from
r
how many are chosen and placed in order (r ≤ n)
n!
n factorial: n×(n−1)×⋯×2×1, with 0!=1

When to use it

Use permutations when different orders count as different outcomes: first, second and third place; officers elected to named posts; arranging books on a shelf. If order does not matter (a hand of cards, a committee), use combinations instead. Repeats allowed (a 4-digit PIN) is simply nr.

Worked example

Ten runners are in a race. In how many ways can gold, silver and bronze be awarded? (n = 10, r = 3)

  1. Start from the formula.

    Pn,r=n!(n−r)!
  2. The (n − r)! cancels the tail of n!, leaving the top 3 factors: 10 choices for the first place, 9 for the second, and so on.

    P10,3=10×9×8=720

Answer 720 ways

Why it works

There are n choices for the first place, n−1 for the second, and so on down to n−r+1 for the r-th: multiply them. Writing that product as n!/(n−r)! is just a compact way of stopping n! after r factors.

Common mistakes

  • Using combinations when order matters: 120 groups of 3, but 720 ordered podiums.
  • Computing n!/r! instead of n!/(n−r)!.
  • Forgetting 0!=1, so that P(n,n)=n! (all n items in a row).