Advertisement

Combinations with Repetition Calculator

Count combinations with repetition (multisets): ways to choose r items from n types when repeats are allowed and order does not matter.

e.g. 5 ice-cream flavours
e.g. 3 scoops

Count the ways to choose r items from n types when you may pick the same type more than once and the order does not matter — scoops from a list of flavours, coins from a set of denominations, donuts from a bakery tray. This count is also called the number of multisets, or “n multichoose r”. For small cases the calculator lists every selection.

How to use this tool

  1. Enter n, the number of different types available.
  2. Enter r, how many items you choose in total. It can be larger than n.
  3. Read the number of combinations with repetition, with the matching counts without repetition and with order mattering for comparison.

Formula

C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!)

The “stars and bars” argument explains it: line up r stars (the items) and n − 1 bars (dividers between the types). Every arrangement of those n + r − 1 symbols is exactly one selection, and choosing which r positions hold stars gives the formula.

Example

Choosing 3 scoops from 5 flavours, repeats allowed: C(5 + 3 − 1, 3) = C(7, 3) = 7! ÷ (3! × 4!) = 5040 ÷ 144 = 35 combinations. Without repeats there would be only C(5, 3) = 10, and if the order of the scoops mattered there would be 5³ = 125.

Frequently asked questions

How is this different from permutations with repetition?

Permutations with repetition count ordered sequences, nʳ — vanilla-then-mint differs from mint-then-vanilla. Combinations with repetition count only which items you end up with, so those two are the same selection.

Can r be bigger than n?

Yes, because types repeat. Choosing 10 donuts from 3 kinds gives C(12, 10) = 66 possible boxes.

What if every type must appear at least once?

Take one of each type first, then choose the remaining r − n freely: C(r − 1, n − 1). For 10 donuts from 3 kinds with at least one of each kind, that is C(9, 2) = 36.

Last updated: 2026-10-30

Advertisement