Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Which Counting Formula Should I Use?

Two questions decide most counting problems: does the order of the chosen items matter, and can an item be used again? Two more checks, identical items and a circle, finish the choice. Questions with "at least one" or "none" go to complementary counting.

When to use this

You have a counting question and are not sure whether it is a permutation, a combination or something else: officers from a club, a pizza with 33 toppings, PIN codes, rearranging BANANA, seating at a round table. Test: swap two chosen items and ask whether the outcome changed.
All counting scenarios are compared in the combinatorics basics lesson.

Decision tree

yes, positions differyesnoall items distinctsome identicalaround a circleno, only the groupnoyesat least one / noneDoes the order matter?Can an item be usedagain?Codes and PINs →Anything special?Permutations →Identical items →Round table →Can an item be chosenagain?Combinations →Stars and bars →Count theopposite →

The same tree, written out

  1. 1Order matters and an item can be used again, as in PINs, passwords and license plates. Use arrangements with repetition: nrn^r, the permutation with repetition formula.
  2. 2Order matters, every item is different, and each item is used at most once. Use permutations: P(n,r)=n!(n−r)!P(n, r) = \frac{n!}{(n-r)!}, or n!n! for all items. The formula is in the permutations lesson.
  3. 3Order matters, all items are used, and some of them are identical, as in the letters of BANANA. Use arrangements with identical items: n!n1! n2!⋯nk!\frac{n!}{n_1!\,n_2!\cdots n_k!}, the multinomial coefficient.
  4. 4Order matters and the items sit around a circle, where turning the circle gives the same arrangement. Use circular arrangements: (n−1)!(n-1)! by the circular permutation formula, explained in the permutations lesson.
  5. 5Only the chosen group matters, and each item can be chosen at most once. Use combinations: (nr)=n!r! (n−r)!\binom{n}{r} = \frac{n!}{r!\,(n-r)!}, defined in the combinations lesson.
  6. 6Only how many of each kind matters, and a kind can be chosen again. Use combinations with repetition: (n+r−1r)\binom{n+r-1}{r}, the weak composition count (stars and bars) in the combinations lesson.
  7. 7The question says "at least one", "none" or "not all", or the direct count splits into many overlapping cases. Use complementary counting: the total minus the opposite (complementary counting lesson). When the groups to remove overlap, use inclusion-exclusion for two sets or for three sets.