Home · Statistics · Probability & Combinatorics · Combinations with Repetition Calculator

Combinations with Repetition Calculator

The number of ways to choose r items from n types when items may be repeated and order does not matter: the stars-and-bars count C(n + r − 1, r).

Your figures

Example result — edit the figures to make it yours

220

Combinations with repetition

Same count as C(n + r − 1, n − 1)220

What this calculator does

The number of ways to choose r items from n types when items may be repeated and order does not matter: the stars-and-bars count C(n + r − 1, r). Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

C(n + r − 1, r) = (n + r − 1)! / (r! · (n − 1)!)

Order does not matter but repetition is allowed: a selection is fully described by how many items of each of the n types it contains, so r may exceed n.

Stars and bars: writing a selection as r stars split by n − 1 bars into n type-bins gives C(n + r − 1, r) arrangements of the stars and bars together.

Without repetition the count would be the smaller C(n, r); allowing repeats always adds selections, never removes them.

Worked example

With the example inputs this page opens with (number of items n 10, items chosen / arranged r 3), the result is 220 — combinations with repetition. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying number of items n
Number of items nCombinations with repetition
535
8120
10220
12.5408
15680
201,540

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

What is an example of a combination with repetition?

Buying 3 scoops from 10 ice-cream flavours, where double and triple scoops of one flavour are allowed and the order of scoops in the tub is irrelevant: C(10 + 3 − 1, 3) = 220 selections.

Why n + r − 1?

The stars-and-bars picture lines up the r chosen items (stars) with n − 1 dividers (bars) separating the n types: n + r − 1 symbols in a row, of which you choose which r positions are stars — hence C(n + r − 1, r).

How does the Combinations with Repetition Calculator work?

The number of ways to choose r items from n types when items may be repeated and order does not matter: the stars-and-bars count C(n + r − 1, r). N types · r chosen → Combinations with repetition C(n + r − 1, r). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Combinations with Repetition Calculator need?

N types · r chosen → Combinations with repetition C(n + r − 1, r). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.