Coupon Collector Calculator

Expected number of random draws to collect all n different items (or k of them), the spread, and the chance of finishing within a set number of draws.

Each draw gives one item, equally likely to be any of the n types. Up to 1,000,000.
For the chance of reaching the goal within this many draws.

Results

Expected draws to collect all 6
14.70
Standard deviation
6.2442
P(goal reached within 9 draws)
0.189043
P(more than 9 draws needed)
0.810957
Draws for a 50% chance (median)
13
Draws for a 90% chance
23
Approximation n·ln n + 0.5772·n + 1/2
14.7139
Expected draws for each new item
item 1: 1 item 2: 1.2 item 3: 1.5 item 4: 2 item 5: 3 item 6: 6

How it’s calculated

Each cereal box holds one of n toys, each equally likely. How many boxes until you have them all? After you have j different toys, the next box is new with probability (n − j)/n, so the wait for the next new toy is geometric with mean n/(n − j). Adding these waits gives the classic answer: n times the n-th harmonic number. The last few items take the longest.

Expected draws for all n: n·(1 + 1/2 + 1/3 + … + 1/n) = n·H_n ≈ n·ln n + 0.5772·n + 1/2 Expected draws for k of n: n/n + n/(n − 1) + … + n/(n − k + 1) Variance for k of n: Σ (i − 1)·n / (n − i + 1)², i = 1 … k

The chance of finishing within a given number of draws is computed exactly by following the probability of having 0, 1, 2, … different items after each draw, which also gives the number of draws needed for a 50% and a 90% chance. For very many draws it uses the bound P(still missing) ≤ C(n, k − 1)·((k − 1)/n)^draws and shows 1 once that bound is below 10⁻¹⁵.

Worked example (Siegrist, §12.7 The Coupon Collector Problem): roll a fair die until all six faces have appeared. The expected number of rolls is 6·(1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6) = 14.7 and the variance is 38.99 (standard deviation 6.244). At least 10 rolls are needed with probability 1051/1296 = 0.81096, so the chance of seeing every face within 9 rolls is 0.18904. For 10 cereal-box toys the expected number of boxes is 29.29.

Frequently asked questions

Why does the last item take so long?

When you are missing only one of n items, each draw has just a 1-in-n chance of being the one you need, so you wait n draws on average for it alone. For a 6-sided die that is 6 rolls; for 100 stickers, 100 packs.

Does this work if some items are rarer than others?

No. The formulas assume every item is equally likely on each draw. Rare items make the full set take longer than this calculator says.

What about packs with several different items each?

The calculator treats every draw as a single random item. If a pack holds 5 independent random stickers, divide the expected draws by 5 for a rough number of packs (slightly optimistic if a pack never repeats a sticker).

How good is the n·ln n approximation?

Very good for large n: for n = 10 the exact expectation is 29.290 and the approximation gives 29.298; for n = 100 they are 518.738 and 518.739. The calculator shows both when you collect the whole set.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator