No ads, no sign-upChecked 2026-08-25

Combinations with Repetition Calculator

Result

35selections

Result: 35 selections

Three scoops from five ice cream flavours, doubles allowed, order ignored: C(5 + 3 − 1, 3) = C(7, 3) = 35 selections. Without repeats the same question has only 10 answers. Because repeats are allowed, r may be larger than n — five scoops from two flavours is a valid question with six answers.

The numbers at a glance

Held fixed: Item types (n) 5.

Items chosen (r)Result
15
215
3Your value35
470
5126

Worked examples

How it's calculated

C(n + r − 1, r)

  1. StepEnter how many distinct types you can draw from as n — five flavours, three coin values.
  2. StepEnter how many items you take in total as r; repeats are allowed and order is ignored.
  3. ResultRead the number of distinct baskets, counting a basket once however it was assembled.

What this number means

This is the counting question in which nothing is used up: r picks from n types, every type available as often as you like, and a basket judged only by what is in it. Listing such baskets directly is awkward, because a basket has no natural order to work along. The stars and bars trick turns it into a question that is easy. Write a basket as a row: one star per item taken, plus n − 1 bars as fences between the n types, so everything left of the first bar belongs to type one, and so on. Three scoops from five flavours becomes a row of three stars and four bars. Every such row is exactly one basket and every basket exactly one row, so the rows are what has to be counted. A row has 3 + 4 = 7 positions, and which 3 of them hold stars settles it completely: C(7, 3) = 35. In general the row has n + r − 1 positions, which gives C(n + r − 1, r). Two things the number does not say. It assumes unlimited stock of every type — cap a flavour at one scoop and it counts too high. And equally many baskets are not equally likely baskets: pick at random and mixed baskets turn up far more often than three of a kind.

Order ignored, but a flavour may come twice

You draw from unlimited stock of each type, and a basket counts once however it was assembled. Three scoops from five flavours: C(5 + 3 − 1, 3) = C(7, 3) = 35 baskets.

It grows although the order is ignored

Allowing repeats adds baskets rather than orders: three from five types gives 10 ordinary combinations but 35 with repetition. Because nothing is used up, r may also be larger than n — five scoops from two flavours has six answers.

Stars and bars is where the formula comes from

Place r identical stars into n labelled bins; separating the bins takes n − 1 bars. Every row of r stars and n − 1 bars is exactly one selection, and there are C(n + r − 1, r) such rows.

Commonly misread

Three scoops from five flavours is C(5, 3) = 10.

That answer forbids taking a flavour twice. With doubles allowed the count is C(7, 3) = 35.

Chocolate, vanilla, chocolate and vanilla, chocolate, chocolate are two selections.

They are two sequences but the same basket, and this calculator counts baskets. Counting the sequences instead gives n to the power r, which is far larger.

Making change from three coin values needs ordinary combinations.

Each value can be used again and again, so it belongs here. The ordinary form fits distinct physical objects, this one fits types.

Reference table

n, rReads asSelections
4, 0take nothing at all1
1, 5one flavour, five scoops1
3, 2two scoops from three flavours6
2, 5five scoops from two flavours6
4, 3three from four types20
5, 3three scoops from five flavours35
10, 2two from ten types55
6, 6six from six types462

Questions

What are combinations with repetition?

They count the ways to pick r items from n distinct types when the same type may be taken more than once and the order does not matter. The count is the multiset coefficient C(n + r − 1, r). Three scoops from five flavours gives C(7, 3), which is 35.

How is this different from ordinary combinations?

Ordinary combinations spend each item, so r can never exceed n; here you draw from unlimited stock of each type, so r is free. The count is always at least as large: three from five types gives 10 ordinary combinations but 35 with repetition. Use the ordinary form for distinct physical objects, this one for types.

How does it differ from permutations with repetition?

Both allow the same type twice, but permutations count ordered sequences and combinations count unordered baskets. Chocolate, vanilla, chocolate is a different sequence from vanilla, chocolate, chocolate, yet the same basket. Permutations give n to the power r, which is far larger.

What is the stars and bars method?

Place r identical stars into n labelled bins; separating the bins takes n − 1 bars. Every row of r stars and n − 1 bars is exactly one selection, and there are C(n + r − 1, r) such rows. That argument is where the formula comes from.

Where is this used?

Anywhere a basket is assembled from unlimited stock without caring about order: ice cream scoops, pizza toppings with doubles allowed, ways of making change from given coin values, sampling with replacement in statistics. The same coefficients appear in multivariate polynomial expansions.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.