Combinations With Repetition Calculator
Enter the number of types (n) and items to choose (r) to get the multiset coefficient C(n+r-1, r).
Use the Combinations With Repetition Calculator
Inputs
Formula
C(n+r−1, r) = (n+r−1)! ÷ (r! × (n−1)!)
Result
Combinations with repetition
Enter n and r above, then click Calculate.
Copied!
Summary
Combinations with repetition count the number of ways to choose r items from n distinct types when order does not matter and the same type can be chosen multiple times. The formula is the multiset coefficient C(n+r-1, r) = (n+r-1)! / (r! × (n-1)!). This is also called "stars and bars" or multichoose. For example, choosing 3 scoops from 4 ice-cream flavors gives C(6,3) = 20 possible combinations.
How it works
- Enter n — the number of distinct types to choose from.
- Enter r — the number of items to select (repetition allowed).
- The tool computes C(n+r-1, r) using exact integer arithmetic to avoid overflow.
- The result is displayed with the full expanded formula and step-by-step values.
- Copy the result to your clipboard with one click.
Use cases
- Count ice-cream combinations when a flavor can be picked more than once.
- Calculate the number of ways to distribute identical items among categories.
- Solve "stars and bars" problems in combinatorics homework.
- Determine possible outcomes when rolling a die r times and ignoring order.
- Enumerate multisets of size r drawn from an alphabet of n symbols.
Frequently Asked Questions
Last updated: 2026-06-11 · Reviewed by Nham Vu