How many ways can you choose k items from n types when repetition is allowed and order does not matter? Get the result using the formula C(n+k-1, k) with a side-by-side comparison to standard combinations.
Combinations with Repetition Calculator - C(n+k-1, k) Formula
How many ways can you choose k items from n types when repetition is allowed and order does not matter? Get the result using the formula C(n+k-1, k) with a side-by-side comparison to standard combinations.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
Five ice cream flavors, three scoops, repeats allowed - how many options?
You walk into an ice cream shop with 5 flavors and order 3 scoops. You can pick the same flavor more than once, and nobody cares about the order on the cone. Chocolate-chocolate-vanilla is the same selection as vanilla-chocolate-chocolate. How many distinct combinations exist? The answer is 35, and you get it from the formula C(n+k-1, k). This calculator does the arithmetic for you and compares the result with standard combinations (no repeats) so you can see exactly how much repetition expands the count.
Result: 35 combinations with repetition vs. only 10 without repetition.
Allowing repeats multiplied the options by 3.5.
When does this formula apply?
Use combinations with repetition whenever you pick k items from n types, repetition is allowed, and order does not matter. The technical term is a multiset of size k from a set of n types. The formula is C(n+k-1, k) = (n+k-1)! / (k! (n-1)!). It is sometimes written with double parentheses as ((n choose k)).
| Scenario | n | k | C(n+k-1, k) | C(n, k) no rep. |
|---|---|---|---|---|
| 3 scoops from 5 flavors | 5 | 3 | 35 | 10 |
| 2 dice (unordered result) | 6 | 2 | 21 | 15 |
| 10 candies among 4 kids | 4 | 10 | 286 | 0 (k>n) |
| 5 coins from 4 denominations | 4 | 5 | 56 | 0 (k>n) |
| Quadratic in 3 variables | 3 | 2 | 6 | 3 |
The four counting methods side by side
Combinatorics has four fundamental counting formulas depending on two questions: does order matter, and is repetition allowed?
| Method | Formula | Order? | Repetition? |
|---|---|---|---|
| Combination | C(n, k) = n! / (k!(n-k)!) | No | No |
| Combination with rep. | C(n+k-1, k) | No | Yes |
| Permutation | P(n, k) = n! / (n-k)! | Yes | No |
| Variation with rep. | n^k | Yes | Yes |
Stars and bars: the intuition behind the formula
Picture k identical stars and (n-1) dividers arranged in a row. Each arrangement maps to exactly one multiset. With 3 types and 4 items:
**|*|*= 2 of type A, 1 of type B, 1 of type C****||= 4 of type A, 0 of type B, 0 of type C|**|**= 0 of type A, 2 of type B, 2 of type C
Total symbols: k + (n-1). Choose k positions for stars out of k + n - 1 total positions: that gives C(n+k-1, k). This bijection between multisets and star-bar strings is why the formula works.
Worked examples
Hand out 10 identical candies to 4 children (each can get zero or more). Here n = 4, k = 10. C(13, 10) = C(13, 3) = 286 ways. Without repetition: impossible (k > n), which makes sense because you cannot give each child at most one candy when there are 10 candies and only 4 kids.
Two dice land. You only care about the set of values, not which die shows which. n = 6 faces, k = 2 dice. C(7, 2) = 21 distinct unordered outcomes. For comparison, there are 36 ordered outcomes (6 x 6), but many are duplicates when order is ignored.
A polynomial of degree d in n variables has C(n+d-1, d) distinct terms. A quadratic (d=2) in 3 variables (x, y, z) has C(4, 2) = 6 terms: x2, y2, z2, xy, xz, yz. A cubic in 4 variables has C(6, 3) = 20 terms.
A store sells 8 types of fruit. You want to buy exactly 4 pieces, and you may buy multiple of the same type. C(11, 4) = 330 possible baskets. Without repetition you could only make C(8, 4) = 70 baskets.
Choose 20 items from 50 types with repetition: C(69, 20) = 7,886,597,962,249,166 (nearly 8 quadrillion). Without repetition: C(50, 20) = 47,129,212,243,960, about 167 times fewer. Repetition has a massive multiplying effect when k is large relative to n.
Common questions
Related tools
Combinations & Permutations Calculator
Calculate standard combinations C(n,k) and permutations P(n,k) without repetition - Open calculator
Variations with Repetition Calculator
Compute n^k for ordered selections with replacement - Open calculator
Factorial Calculator
Calculate n! with step-by-step breakdown and digit count - Open calculator
Probability Calculator
Calculate probabilities for single and compound events - Open calculator
Prime Factorization Calculator
Break any integer into its prime factors - Open calculator