Math

Combinations With Repetition Calculator

Multiset counting — donuts, dice and stars and bars.

Enter your values

ⓘ Live results

Results
Combinations with repetition
35
Combinations without repetition
10
Permutations with repetition
125
Permutations without repetition
60
Stars and bars setup
3 stars and 4 bars

Quick answer

Choosing k items from n types with repetition allowed gives C(n + k − 1, k) possibilities — the stars and bars result.

C(n + k − 1, k)

How to use the Combinations With Repetition Calculator

  1. 1Enter how many distinct types you can choose from.
  2. 2Enter how many items you are picking.
  3. 3Read the repetition-allowed count, with the three other counting rules for comparison.

Worked example

Using the values the calculator loads with:

Inputs

  • Number of types n5
  • Items chosen k3

Results

  • Combinations with repetition35
  • Combinations without repetition10
  • Permutations with repetition125
  • Permutations without repetition60
  • Stars and bars setup3 stars and 4 bars

Frequently asked questions

What is the classic example?

Choosing 3 donuts from 5 flavours when you can repeat flavours: C(7, 3) = 35 different boxes.

Why is it called stars and bars?

Picture k stars split into n groups by n − 1 bars; every arrangement of stars and bars is one valid selection.

About this calculator

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.