Skip to content
FiftyCalc Free calculators for all 50 states

Combinations With Repetition Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter the number of item types and how many items you pick, repeats allowed.

Result

Sample figures

Combinations with repetition C(n + r − 1, r)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Combinations With Repetition Calculator

Number of item types (n): enter 1 or more. Prefilled example: 5.

Number of items picked (r): enter 0 or more. Prefilled example: 3.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Number of item types (n): enter 1 or more.
  2. Number of items picked (r): enter 0 or more.
  3. Read the result: Combinations with repetition C(n + r − 1, r).

How this calculator works

C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!): the number of multisets of size r drawn from n types (the "stars and bars" count).

Example: choosing 3 scoops from 5 flavors, where two or three scoops can be the same flavor.

The formula

  1. C=ncr⁡(n+r−1,r)
Symbols used in the formula
SymbolMeaning
nNumber of item types
rNumber of items picked
CCombinations with repetition C(n + r − 1, r)
ncr(n, k)the number of ways to choose k items from n, order ignored.

Worked example

Number of item types (n)5
Number of items picked (r)3
  1. C=ncr⁡(5+3−1,3)=35

Combinations with repetition C(n + r − 1, r) 35

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How many ways to pick 3 scoops from 5 flavors if flavors can repeat?

C(7, 3) = 35.

How is it different from combinations without repetition?

Without repetition each item is used at most once, so 3 different flavors out of 5 give only C(5, 3) = 10.

Questions answered

Related calculators