The rule
n! ÷ (r₁! × r₂! × …) for repeated items
Why it works
With all items distinct there are n! orderings. Repeated items mean some of those orderings are indistinguishable, so you divide by the factorial of each repeat count to remove the duplicates.
How to do it by hand
- Work out the factorial of the total number of items
- For each repeated item, work out the factorial of how many times it repeats
- Divide the first by the product of the rest
- For a circle, divide by n, since rotations are the same arrangement
What is worth knowing
The word MISSISSIPPI is the standard example: eleven letters, but with four S, four I and two P, so 11! divided by 4!4!2! gives 34,650 rather than 39,916,800 — over a thousand times fewer. Circular permutations divide by n for a different reason: seating five people round a table has 4! distinct arrangements, not 5!, because rotating everyone one seat leaves the arrangement unchanged. If the table can also be flipped, you halve it again.