Coupon Collector Calculator

Enter the number of distinct items to find the expected draws to collect them all.

Result

14.7 draws
14.2 draws
6 items

How it is calculated

For n equally likely item types drawn at random with replacement, the expected number of draws to see every type at least once is E = n × Hn, where Hn = 1 + 1/2 + 1/3 + … + 1/n is the n-th harmonic number. The tool adds the fractions one by one (for very large n it switches to the asymptotic series for Hn), multiplies by n and rounds to one decimal. It also shows the approximation n × ln(n) + 0.5772 × n, where 0.5772 is the Euler–Mascheroni constant. n must be a whole number of at least 1: a decimal such as 6.9, zero or a negative number shows no result. The model assumes every type is equally likely on every draw, so uneven rarities need a different calculation.

Worked example

How many rolls of a fair six-sided die do you expect before every face has appeared? Here n = 6. H6 = 1 + 0.5 + 0.3333 + 0.25 + 0.2 + 0.1667 = 2.45. Then 6 × 2.45 = 14.7 draws. The approximation gives 6 × ln(6) + 0.5772 × 6 = 10.75 + 3.46 = 14.2 draws, a bit lower because the shortcut is less accurate for small n. The first new face comes immediately, but the last one alone takes 6 rolls on average. For a 52-card deck drawn with replacement the tool gives 236.0 draws.

Try this example →

Common mistakes

  • Treating the result as a guarantee. 14.7 is an average over many tries; any single run can need far more or far fewer draws.
  • Assuming all items are equally likely when they are not. Loot-box items with different drop rates take much longer than this formula says, because the rarest item dominates.
  • Entering a non-integer count. The number of distinct items must be whole, so 6.9 gives no result rather than being rounded.
  • Confusing draws with distinct items already held. The formula counts total draws including duplicates, not purchases of new items only.
  • Using the approximation for small sets. For n = 6 it gives 14.2 against the exact 14.7, so rely on the n × Hn figure when n is small.

About this calculator

The coupon collector's problem is a classic result in probability theory: if you draw items at random (with replacement) from a set of n distinct types, how many draws do you expect to make before you've collected every type at least once? The expected number is n·Hn, where Hn is the nth harmonic number (1 + 1/2 + 1/3 + ... + 1/n), which for large n is well approximated by n·ln(n) + γn.

The counterintuitive part is that collecting the last few missing items takes disproportionately long — getting the final type alone takes n draws on average. Statisticians and computer scientists use this formula to analyze things like hash table collisions and randomized algorithms, while it also explains real-world experiences like collecting every sticker in an album or every character skin in a loot-box game.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators