What is a combination with replacement?
A combination with replacement, often called a "multichoose," counts the number of ways to pick r items from n distinct types when the order of selection does not matter and you are allowed to pick the same type more than once. Each result is a multiset: for example, choosing 2 scoops of ice cream from 3 flavors where repeats are allowed gives selections like {vanilla, vanilla} or {vanilla, chocolate}.
How to use the calculator
Enter \(n\), the number of distinct objects or types to choose from, and \(r\), the size of the sample you want to draw. Both must be non-negative integers. Press calculate and the tool returns \(C^R(n,r)\), the number of distinct multisets of size \(r\).
The formula explained
The count equals the binomial coefficient \(C(n + r - 1, r)\), which expands to $$C^R(n, r) = \binom{n + r - 1}{r} = \frac{(n + r - 1)!}{r!\,(n - 1)!}$$ This is the classic "stars and bars" result: distributing \(r\) identical stars into \(n\) bins separated by \(n - 1\) bars. To avoid factorial overflow, the calculator multiplies the running product by \((n - 1 + i)\) and divides by \(i\) for \(i\) from 1 to \(r\): $$C^R(n,r) = \prod_{i=1}^{r} \frac{n - 1 + i}{i}$$
Worked example
For \(n = 10\) and \(r = 3\): $$C^R(10,3) = C(12,3) = \frac{12 \times 11 \times 10}{3 \times 2 \times 1} = \frac{1320}{6} = 220$$ So there are 220 ways to choose 3 items from 10 types with repetition allowed.
FAQ
How is this different from a regular combination? A regular combination \(C(n,r)\) forbids repetition; combination with replacement allows the same item to be chosen multiple times, so the count is generally larger.
What if r = 0? There is exactly one way to choose nothing, so \(C^R(n,0) = 1\) for any \(n \geq 1\).
What if n = 0? With no items and \(r > 0\) the result is 0; the empty case \(n = 0, r = 0\) equals 1 by convention.