Skip to main content
HSCalculadora

Combinations with Repetition Calculator

Count multiset combinations allowing repeats.

Results update as you type.

Combinations with repetition
—

How it works

Combinations with repetition count selections where you can pick the same item more than once and order does not matter, and this calculator computes them. You enter n, the number of distinct types of items, and k, how many items you are choosing, and it returns the number of possible combinations. Unlike ordinary combinations, where each item can be chosen at most once, combinations with repetition allow the same type to be selected multiple times, which increases the count. The formula is the binomial coefficient of n plus k minus one choose k, a result famously derived by the stars and bars argument in combinatorics: distributing k identical choices among n types is like placing k stars and n minus one dividing bars. A classic example is choosing k scoops of ice cream from n flavors when you can repeat flavors: with 5 flavors and 3 scoops, there are C(7,3) equals 35 combinations. This type of counting appears in problems like distributing identical objects into distinct groups, buying a dozen donuts from several varieties, or counting monomials of a given degree. It is important to distinguish this from permutations with repetition (where order matters) and ordinary combinations (no repetition). This calculator handles the unordered, repetition-allowed case. Both n and k must be non-negative, with n at least one. Enter n and k to count the combinations with repetition.

Formula

C(n + k − 1, k) = (n + k − 1)! / (k! × (n − 1)!)

Combinations with repetition count how many ways you can choose k items from n types when the same type can be picked multiple times and order does not matter. It equals the binomial coefficient of n plus k minus one, choose k, a result also known as the stars and bars formula.

Source:Combinatorics

We review all our tools from time to time to ensure accuracy.

Worked example

n (types of items):5k (items to choose):3
Choosing 3 scoops from 5 flavors with repeats: C(7,3) = 35.

How to use this calculator

  1. 1

    Enter your values

    Enter n (types of items) and k (items to choose).

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Combinations with repetition updates instantly as you type — no button to press.

Frequently asked questions

What are combinations with repetition?

Combinations with repetition count the ways to choose k items from n types when the same type can be picked more than once and order does not matter. They differ from ordinary combinations, which allow each item only once. The count is given by the binomial coefficient of n plus k minus one, choose k.

What is the stars and bars method?

Stars and bars is a combinatorial technique that proves the formula for combinations with repetition. Choosing k items from n types is equivalent to arranging k identical stars and n minus one bars that divide them into n groups. The number of such arrangements is the binomial coefficient of n plus k minus one, choose k, which this calculator computes.

How is this different from ordinary combinations?

Ordinary combinations count selections where each item is chosen at most once, using n choose k. Combinations with repetition allow choosing the same item multiple times, which yields more possibilities, counted by n plus k minus one choose k. Choose the repetition version when items can be selected repeatedly, like scoops of ice cream from a set of flavors.

Can you give a real-world example?

Choosing 3 scoops of ice cream from 5 flavors, where you can pick the same flavor more than once and the order of scoops does not matter, is a combination with repetition: C(5 plus 3 minus 1, 3) equals C(7, 3) equals 35 possible combinations. Other examples include buying a dozen donuts from several types or distributing identical items into groups.

What is the difference from permutations with repetition?

Permutations with repetition count ordered arrangements where items can repeat, giving n to the power k. Combinations with repetition count unordered selections where items can repeat, giving n plus k minus one choose k. The key difference is whether order matters: permutations distinguish arrangements, combinations do not. This calculator handles the unordered combination case.