Combinations with Repetition – C(n+r−1, r)
Multiset counting: 3 scoops from 4 flavors = C(6,3) = 20 via stars and bars ⭐|⭐⭐|.
- Formula substitution and plain-combination contrast shown.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How Combinations with Repetition Work
When selection order does not matter and duplicates are welcome, the count is the multiset formula C(n+r−1, r). Choosing 3 scoops from 4 flavors gives C(6,3) = 20 possibilities — three vanilla, or two chocolate one strawberry, order never counted. Stars and bars makes it visual: r stars (picks) and n−1 bars (dividers between types) form a string of r+n−1 symbols; choosing which r positions hold stars — C(6,3) for our example — enumerates every multiset exactly once, e.g. ⭐|⭐⭐| | = one flavor-1 and two flavor-2 scoops. The calculator prints the formula substitution, the star-bar layout for small cases, and the contrast with plain combinations (C(4,3) = 4 without repeats). Distribution problems are the same count: 7 identical candies among 3 children split as C(9,2) = 36 arrangements.
- 1
Enter types n and picks r
e.g. 4 flavors, 3 scoops
- 2
Apply C(n+r−1, r)
C(6,3) = 20 with the substitution shown
- 3
View stars and bars
Star/bar strings enumerate each multiset
- 4
Compare plain C(n,r)
4 without repetition vs 20 with — repetition quintuples it
Use Cases
Café Orders
20 three-scoop combinations from four flavors
Candy Distribution
7 identical candies, 3 children: C(9,2) = 36 ways
Integer Solutions
x+y+z = 7 has 36 non-negative solutions
Tips
- 1
Bars count n−1, not n or r
- 2
Identical items into distinct bins uses the same formula
- 3
Repetition always raises the count: 4 → 20 here
Common Mistakes
Using plain C(n,r) and forgetting duplicate-friendly selections
Treating order as mattering — that is nʳ, here 64
Miscounting bars (n−1, not n)
Excluding zero-pick types; empty bins are legal
FAQs
Three scoops from four flavors — how many combos?
What is stars and bars?
Seven candies, three kids?
Why not just C(4,3) = 4?
Same count as equation solutions?
Related tools
Pick another tool to continue your calculation.
Complex Number Calculator – Arithmetic & Modulus
Perform operations on complex numbers.
Complex Number Calculator - Calculate with Complex Numbers
Perform calculations with complex numbers online. Add, subtract, multiply, divide, and find magnitude and phase of complex numbers. Essential calculator for engineering and advanced mathematics.
Base-N Converter – Positional Notation Steps
Convert between any numeral bases from 2 to 36.
Roman Numeral Converter – Numbers & Dates
87 = LXXXVII, 2026 = MMXXVI, 494 = CDXCIV. Convert both ways between Roman and Arabic numbers with the full chart from I = 1 to M = 1000.
Symbolic Derivative Calculator – d/dx
Calculate symbolic derivatives of basic functions.
Distance Formula Calculator for Two Points
Calculate the distance between two points on a coordinate plane.