Combinations with Repetition Calculator
Enter the number of item types and how many you pick, and get the count of distinct selections when repeats are allowed and order is irrelevant — the formula behind ice cream scoops, topping choices, and multiset sampling.
Two values, one count
Enter the number of item types (n) and how many you choose (r); the calculator returns C(n + r − 1, r) — the multiset coefficient.
Repeats allowed, order ignored
Each item type may be chosen more than once, and the sequence of choices does not matter — only the final composition counts.
What are combinations with repetition?
Choosing a multiset when order does not matter
A combination with repetition (also called a multiset coefficient) is a way of choosing r items from n distinct types where the same type may appear more than once and the order of the choice does not matter — picking two chocolate scoops and one vanilla is the same selection however you list it. The count is written C(n + r − 1, r) and is computed as the ordinary binomial coefficient with upper argument n + r − 1. This differs from standard combinations, where each item may be chosen at most once, and from permutations, where the order of picks matters.
Enter the number of item types and how many you pick to get the count of distinct combinations with repetition instantly.
One formula, derived from the "stars and bars" counting argument.
C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!)The formula reduces the problem to an ordinary binomial coefficient: instead of choosing r items from n types, imagine distributing r identical balls into n labelled bins — any bin may hold any number of balls. The stars and bars argument shows that the number of such distributions equals C(n + r − 1, r). The calculator evaluates this using the multiplicative method, so even large inputs stay accurate without computing large factorials directly.
The number you get counts the distinct multisets you can assemble — every unique combination of item types and their counts, regardless of order. A few properties help you sense-check the answer. First, the result is always at least as large as the ordinary combination count C(n, r), because allowing repeats opens up additional selections that strict combination sampling forbids. Second, choosing zero items always yields 1, because there is exactly one empty multiset. Third, choosing from a single type (n = 1) always yields 1 as well, because the only option is to take r copies of that one type. When your result is very large, that reflects the combinatorial explosion that comes with free repetition — choosing 10 items from 10 types with repeats gives 92,378 distinct multisets, far more than the 252 you get without repetition.
The multiset coefficient formula is exact, but a few conditions must hold for it to apply.
Unlimited supply, order irrelevant, n ≥ 1
This calculator assumes each item type is available in unlimited supply — you can pick the same type as many times as you like. If each physical item can only be chosen once, use the ordinary combinations calculator instead. The formula also counts only unordered selections: if the sequence matters (e.g. a combination lock), use a permutations calculator. Finally, n must be at least 1 and r must be a non-negative whole number; the calculator returns no result for inputs outside those bounds.