Combinations with Repetition Calculator

Combinations with repetition count the number of ways to choose a group of items when repeats are allowed and order does not matter. The everyday picture is choosing scoops of ice cream from several flavors: you may take the same flavor twice, and the order you scoop them does not change the bowl. This calculator counts those selections using the standard formula C(n plus r minus one, choose r), where n is the number of distinct types you can pick from and r is how many items you take. You enter the two numbers, and the tool returns the count, computed deterministically from the formula shown below, never estimated, so the worked example reconciles exactly with the figure on screen. The result is best understood through the stars and bars argument: arrange r identical stars among n categories using n minus one dividing bars, and every arrangement corresponds to exactly one valid selection. This count differs from ordinary combinations, which forbid repeats, and from permutations, which care about order. It appears throughout combinatorics: distributing identical objects into bins and counting non-negative integer solutions to an equation both reduce to it. Use this tool to solve a counting problem or to check homework.

Combinations with repetition count multisets using C(n + r - 1, r). Choosing r = 3 items from n = 5 types gives C(7, 3) = 35 distinct selections.

Source: US National Institute of Standards and Technology (NIST). As at 25 June 2026.

Distinct items to choose from
How many items you select
n + r - 1--
Combinations C(n + r - 1, r)--

Combinations with repetition formula

C(n + r - 1, r) = (n + r - 1)! / ( r! x (n - 1)! )
n = number of distinct types
r = number of items chosen
order does not matter, repeats allowed

The formula is the binomial coefficient of n plus r minus one, choose r. It counts the multisets of size r that can be formed from n types, the result proved by the stars and bars method of arranging r stars among n categories.

Worked example

Choose 3 scoops from 5 ice cream flavors, repeats allowed.

  1. n = 5, r = 3
  2. n + r - 1 = 5 + 3 - 1 = 7
  3. C(7, 3) = 7! / (3! x 4!) = 5040 / (6 x 24) = 5040 / 144 = 35

There are 35 possible selections. These are the calculator's default inputs, so the result above matches the widget exactly.

Combinations with repetition for small n and r

n (types)r = 2r = 3r = 4
361015
4102035
5153570
62156126

Reference: US National Institute of Standards and Technology (NIST).

Combinations with repetition: frequently asked questions

What are combinations with repetition?

Combinations with repetition count how many ways you can choose r items from n distinct types when the same type may be picked more than once and the order of selection does not matter. A classic example is choosing scoops of ice cream: with several flavors available you can repeat a flavor, and the order you scoop them does not change the bowl.

What is the formula?

The number of combinations with repetition is C(n + r - 1, r), the binomial coefficient of n plus r minus one, choose r. Here n is the number of types and r is how many items you select. This counts multisets of size r drawn from n types.

How is this different from ordinary combinations?

Ordinary combinations choose r distinct items from n with no repeats, counted by C(n, r). Combinations with repetition allow the same item to be chosen again, which always gives a larger count. Permutations differ again because they care about order, while neither kind of combination does.

What is the stars and bars method?

Stars and bars is the standard proof. Picture r identical stars to distribute among n types, separated by n minus one bars. Each arrangement of stars and bars is one multiset, and the number of arrangements is C(n + r - 1, r), which is exactly the formula this calculator uses.

Where is this count used?

It appears whenever you allocate identical items into categories: distributing indistinguishable balls into boxes, counting non-negative integer solutions of an equation, choosing a hand of dice values, or counting terms in a polynomial expansion. It is a core tool in combinatorics.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.