Overview
Combinations with repetition count selections where you can pick the same item more than once and order doesn't matter, such as choosing 5 scoops from 12 ice cream flavors.
Enter the number of distinct items, n, and how many you select, r.
Worked examples
| Inputs | Result |
|---|---|
| Unique Items (n)12Items Selected (r)5 | Combinations with repetition: C(n+r-1, r) = 4,368Inputs: n=12, r=5 |
Show 2 more examples
| Unique Items (n)4Items Selected (r)3 | Combinations with repetition: C(n+r-1, r) = 20Inputs: n=4, r=3 |
| Unique Items (n)6Items Selected (r)10 | Combinations with repetition: C(n+r-1, r) = 3,003Inputs: n=6, r=10 |
Combinations with repetition by items selected
With the calculator's starting values, the combinations with repetition is 4,368. The table shows how it changes with the items selected.
| Items Selected (r) | Combinations with repetition |
|---|---|
| 3 | 364 |
| 4 | 1,365 |
| 5starting value | 4,368 |
| 6 | 12,376 |
| 7 | 31,824 |
Other inputs: Unique Items: 12 n. Change them in the calculator above for your own numbers.
How it works
This is the 'stars and bars' formula, C(n + r − 1, r). It counts how to split r identical picks among n types.
The formula
Practical tips
- 5 scoops from 12 flavors gives 4,368 combinations.
- 3 donuts from 4 types gives C(6, 3) = 20.
- Without repetition, the same 5 from 12 would be only 792.
Frequently asked questions
When do I use this formula?
When repeats are allowed and order doesn't matter.
What if order matters?
Use permutations with repetition, nʳ.
Why 'stars and bars'?
Picture r stars split into n groups by n − 1 bars.