Combinations with Repetition Calculator NZ
This calculator counts combinations with repetition, the number of ways to choose a number of items from several types when you can pick the same type more than once and the order does not matter. Ordinary combinations assume you cannot repeat an item, but many real situations allow repeats: choosing a dozen doughnuts from six flavours, where you can take several of the same, picking scoops of ice cream from the available flavours, or distributing identical items among categories. Because repeats are allowed but order still does not matter, the count follows a different formula from ordinary combinations, derived by a neat argument known as stars and bars. This tool computes it. You enter the number of types to choose from and the number of items you are choosing, and the calculator returns the number of combinations with repetition, along with the count of arrangements where order does matter for comparison, and the values you entered. The results update as you type. Use it for probability and combinatorics homework, for counting selections where repeats are allowed, or to understand the difference from ordinary combinations. The formula is the combination of n plus r minus 1, choose r, where n is the number of types and r is the number you pick. This comes from the stars and bars method: imagine the r items as stars and use n minus 1 bars to divide them among the n types, then count the arrangements. The calculator also shows n to the power r, the count if order did matter, which is much larger, to highlight how requiring order multiplies the possibilities. This counting principle is a staple of combinatorics and appears throughout probability, where knowing how many ways something can happen is the first step.
Combinations with repetition = (n + r - 1) choose r, by the stars and bars method. Order does not matter and repeats are allowed. n to the power r counts ordered selections.
How it works
Choosing r items from n types with repetition allowed, where order does not matter, equals the binomial coefficient of n plus r minus 1, choose r. This comes from the stars and bars argument: the r choices are stars, separated into n groups by n minus 1 bars, and the count is the number of ways to arrange them. The ordered count, where order matters, is n to the power r.
Worked example
Choosing 3 items from 5 types with repetition allowed gives the combination of 5 plus 3 minus 1, which is 7, choose 3. That equals 35. If order mattered instead, there would be 5 to the power 3, which is 125 ordered selections, far more than the 35 unordered combinations.
Related calculators
- Combination (nCr): combinations.
- Permutation (nPr): permutations.
- Probability Calculator: probability.
- Factorial Calculator: factorials.
- Secant Calculator: the secant of an Angle.
- Simultaneous Equation Solver: 2 and 3 Variable Linear Systems.