Calc Lab Online
Math & Basic Calculators

Combination with Replacement Calculator

Free online Combination with Replacement Calculator. Calculate multicombinations C(n + r - 1, r) using stars and bars, compare all 4 sampling models, and view step-by-step proofs.

Sponsored • Leaderboard
★Real-World Examples & Presets
Click to autofill

1Enter Parameters

Number of distinct categories, flavors, or bins (n > 0)
Number of elements selected with repetition allowed (r ≥ 0; r can exceed n!)
Repetition Allowed: Unlike standard combinations where r ≤ n, combinations with replacement allow items to be chosen multiple times (e.g. 3 chocolate scoops in one bowl). Therefore, r can be greater than n.
Stars & Bars Mapping7 Slots
★ | ★ | ★ | |
Stars (Choices)r = 3
Bars (Dividers)n − 1 = 4

Multichoose Combinations Result

Combinations with Replacement: CR(5, 3)
35combinations
Formula applied: C(5 + 3 − 1, 3) = C(7, 3)

Comparison: The 4 Fundamental Sampling Models

n = 5, r = 3
✓ With Replacement, UnorderedThis Tool
35

Multichoose: C(n + r − 1, r)

Without Replacement, Unordered
10

Combinations: C(n, r) = n! / [r!(n − r)!]

With Replacement, Ordered
125

Sequences: nr

Without Replacement, Ordered
60

Permutations: nPr = n! / (n − r)!

Multiset Enumerator (35 Unique Combinations)

Exact multichoose outcomes using labels A, B, C...

Step-by-Step Derivations & Proof

Step 1: Set Up the Stars and Bars ParametersTotal Symbols = n + r - 1
Substitution: Stars (r) = 3, Dividers (n - 1) = 5 - 1 = 4 → Total Positions = 7

To distribute 3 indistinguishable choices into 5 distinguishable categories, we use 4 dividers (bars) to separate 5 bins. The total number of symbol slots is 3 stars + 4 bars = 7 positions.

Step 2: Apply the Combinations with Replacement FormulaCR(n, r) = C(n + r - 1, r) = (n + r - 1)! / [r! × (n - 1)!]
Substitution: CR(5, 3) = C(7, 3) = 7! / (3! × 4!) → C(7, 3)

Choosing which 3 of the 7 total positions will hold the stars uniquely determines the count for each category.

Step 3: Evaluate the Combinatorial ProductC(N, k) = [N × (N-1) × ... × (N-k+1)] / [k × (k-1) × ... × 1]
Substitution: Calculating combinations of 7 choose 3 → 35

Multiplying the factors and dividing by 3! yields exactly 35 unique combinations with repetition.

Advertisement • In-Content

How to Use the Combination with Replacement Calculator

Step-by-step instructions for computing multichoose arrangements and stars and bars partitions

1

Enter Category Types (n)

Input the total number of distinct types, flavors, item categories, or urns available to choose from (n > 0).

2

Enter Selection Count (r)

Input the total number of elements to select. Because replacement (repetition) is allowed, r can exceed n (e.g., choosing 12 donuts from 4 flavors).

3

Inspect Stars & Bars Mapping

Visualize how r stars (☆) and (n − 1) divider bars (|) form a total of (n + r − 1) symbol slots.

4

Compare Across All 4 Models

Review the 4-way comparison table contrasting combinations with replacement against standard combinations (nCr), permutations (nPr), and ordered powers (nr).

Combinations with Replacement Theory

The Stars and Bars theorem, multisets, and the 4 fundamental sampling regimes

In combinatorics, a combination with replacement (also called multicombination, multichoose, or k-combination with repetition) counts the number of ways to select r items from a set of n distinct types where the order of selection does not matter and elements can be chosen more than once.

The Multichoose Formula

Choosing r items from n categories with replacement is equivalent to standard combinations of (n + r − 1) items taken r at a time:

CR(n, r) = C(n + r − 1, r) = (n + r − 1)! / [ r! · (n − 1)! ]

The Famous “Stars and Bars” Proof

To understand why the formula works, consider distributing r indistinguishable items (“stars”) into n distinguishable bins:

  1. To partition items into n separate bins, you need exactly (n − 1) dividers (“bars”).
  2. For example, with n = 3 bins and r = 5 items, one possible arrangement is:
    ☆☆ | ☆ | ☆☆ (2 items in Bin 1, 1 item in Bin 2, 2 items in Bin 3).
  3. The total number of symbols in any valid arrangement is r stars plus (n − 1) bars, which equals n + r − 1 total positions.
  4. Choosing which r positions will contain the stars (or equivalently, which n − 1 positions contain the bars) is a standard combination problem: C(n + r − 1, r).

Taxonomy: The 4 Classical Sampling Regimes

Sampling ModelOrder Matters?Replacement Allowed?Mathematical Formula
Permutations (nPr)YesNon! / (n − r)!
Sequences / TuplesYesYesnr
Combinations (nCr)NoNon! / [r!(n − r)!]
Multichoose (This Calculator)NoYesC(n + r − 1, r)

Real-World Worked Examples

Example 1: Ice Cream Parlor

3 Scoops from 5 Flavors

How many 3-scoop bowls can you create from 5 flavors if flavors may be repeated?

n = 5, r = 3
C(5 + 3 − 1, 3) = C(7, 3)
7! / (3! × 4!) = 35
= 35 distinct bowls
Example 2: Bakery Dozen

12 Donuts from 4 Varieties

A customer orders a box of a dozen donuts from 4 available varieties.

n = 4, r = 12
C(4 + 12 − 1, 12) = C(15, 12)
C(15, 3) = (15 × 14 × 13) / 6
= 455 donut boxes
Example 3: Rolling 3 Dice

Unordered Dice Outcomes

How many unique outcomes exist when rolling 3 identical 6-sided dice?

n = 6 faces, r = 3 dice
C(6 + 3 − 1, 3) = C(8, 3)
(8 × 7 × 6) / 6
= 56 unique outcomes