Combinations With Repetition Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the number of item types and how many items you pick, repeats allowed.
Result
Combinations with repetition C(n + r − 1, r)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Number of item types (n): enter 1 or more.
- Number of items picked (r): enter 0 or more.
- Read the result: Combinations with repetition C(n + r − 1, r).
How this calculator works
C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!): the number of multisets of size r drawn from n types (the "stars and bars" count).
Example: choosing 3 scoops from 5 flavors, where two or three scoops can be the same flavor.
The formula
| Symbol | Meaning |
|---|---|
| Number of item types | |
| Number of items picked | |
| Combinations with repetition C(n + r − 1, r) | |
ncr(n, k) | the number of ways to choose k items from n, order ignored. |
Worked example
| Number of item types (n) | 5 |
|---|---|
| Number of items picked (r) | 3 |
Combinations with repetition C(n + r − 1, r) 35
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How many ways to pick 3 scoops from 5 flavors if flavors can repeat?
C(7, 3) = 35.
How is it different from combinations without repetition?
Without repetition each item is used at most once, so 3 different flavors out of 5 give only C(5, 3) = 10.