Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Count Permutations

A permutation is an ordered arrangement of distinct items, each used at most once. Fill the positions one at a time: the first has nn choices, the next one fewer, and the count is the product of these falling factors.

Recognize the task

Distinct items are placed in order and none repeats: officers such as president, vice president and secretary, a race podium, books on a shelf, a batting lineup. Test: swap two of the chosen items; if that gives a different outcome, order matters and this is a permutation.
Permutations and the notation P(n,r)P(n, r) are defined in the permutations lesson.

Two ways to do it

Multiply falling factorsusual
P(n,r)=n(n−1)(n−2)⋯(n−r+1)P(n, r) = n(n-1)(n-2)\cdots(n-r+1)
One factor per position, each one smaller than the last, by the multiplication rule.
Factorial formulaformula
P(n,r)=n!(n−r)!P(n, r) = \dfrac{n!}{(n-r)!}
The partial permutation formula; with all nn items it becomes the full permutation n!n!.

Steps

StepOn 8 club members choosing a president, vice president and secretary
1Check that order matters and nothing repeats. The offices are different, so Ana as president and Ben as secretary is not the same as the reverse. One person holds one office.ordered, no repetition
2Read n and r. nn is the number of distinct items to choose from; rr is the number of positions to fill.n=8n = 8, r=3r = 3
3Multiply one factor per position. The first position has nn choices, the next n−1n - 1, and so on, rr factors in all.Multiplication principle ↗8⋅7⋅68 \cdot 7 \cdot 6
4Compute the product. Check with the factorial form: 8!5!\frac{8!}{5!} cancels to the same three factors.Factorial ↗P(8,3)=336P(8, 3) = 336

Worked examples

Example 1 · all items in a row

full permutation
55 books, 55 places on a shelf
every item is used
5!=5⋅4⋅3⋅2⋅15! = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1
one factor per place
120120 orders
multiply

Example 2 · some items in a row

partial
44 of 77 photos in a row: n=7n = 7, r=4r = 4
only four places
P(7,4)=7⋅6⋅5⋅4P(7, 4) = 7 \cdot 6 \cdot 5 \cdot 4
four falling factors
840840 arrangements
multiply

Example 3 · two people at the ends

restriction
66 people in a row, Ann and Bo at the two ends
fill the fixed places first
22 ways for the ends
Ann left or Ann right
4!=244! = 24 ways for the middle
four people, four seats
2⋅24=482 \cdot 24 = 48
multiplication principle
Watch arrangements grow position by position in the permutations visualizer or the partial permutation tool.

See it happen

Picture rr empty slots. The first slot can take any of the nn items. Once it is filled, that item is gone, so the second slot has n−1n - 1 choices, the third n−2n - 2, and so on. The arrangements form a tree whose branches thin out by one at every level, and the number of leaves is the product of the branch counts.

Common mistakes

Using combinations when order matters

✗ president, vice president, secretary from 88: (83)=56\binom{8}{3} = 56
✓ P(8,3)=336P(8, 3) = 336: each group of 33 fills the offices in 3!=63! = 6 ways

Writing too many factors

✗ P(7,4)=7!=5040P(7, 4) = 7! = 5040
✓ stop after r=4r = 4 factors: 7⋅6⋅5⋅4=8407 \cdot 6 \cdot 5 \cdot 4 = 840

Allowing repeats

✗ 33 different offices from 88 people: 83=5128^3 = 512
✓ one person per office: 8⋅7⋅6=3368 \cdot 7 \cdot 6 = 336
Use nrn^r only when an item can be used again.