Card Games and Counting

The Birthday Problem Applied to a Deck of Cards

Apply the birthday problem to a 52-card deck: how quickly repeated cards or matching ranks appear in draws, with checked examples and a two-deck match puzzle.

On this page
  1. The original puzzle
  2. Why the answer is small
  3. Matching ranks instead of exact cards
  4. Without replacement
  5. A different puzzle: matching two shuffled decks
  6. What this says about coincidences

The original puzzle

The birthday problem asks how many people must be in a room before it is more likely than not that two of them share a birthday. With 365 equally likely birthdays, the answer is 23, which surprises most people because 23 is far smaller than 365. It is called a paradox only because intuition is poor here; the arithmetic is not in doubt.

The same structure appears with any set of equally likely labels. Replace days of the year with the 52 cards in a deck and the question becomes: how many cards must you draw, with each card put back and the deck reshuffled between draws, before a repeated card is more likely than not?

Why the answer is small

The trick is to compute the opposite event: no repeats at all. Draw one card at a time with replacement.

  • The first card can be anything: probability 1.
  • The second card avoids the first with probability 51/52.
  • The third avoids both with probability 50/52.
  • The nth avoids all earlier cards with probability (52 - (n - 1))/52.

Multiply these to get the probability of no repeat after n draws, and subtract from 1 for the chance of at least one repeat. The key point is that you are not comparing each card to a single target. With n cards there are n(n - 1)/2 pairs that could match, and that count grows with the square of n.

Working it out for a 52-card deck gives these results:

Draws (with replacement) Chance of at least one repeated card
5 about 18.0%
8 about 43.2%
9 about 52.0%
10 about 60.3%
14 about 85.4%
20 about 98.5%

So by the ninth draw, a repeat is more likely than not. A rough rule says the number of draws needed is on the order of the square root of the number of possible cards: the square root of 52 is a little over 7, and the exact crossing point is 9.

Matching ranks instead of exact cards

A more card-like version asks about rank. Draw cards with replacement and ask whether any two share a rank, ignoring suit. There are only 13 ranks, so matches come faster:

Draws Chance two share a rank
3 about 21.9%
4 about 39.9%
5 about 58.4%
6 about 74.4%

Five draws are enough to make a shared rank more likely than not. This is the same product as before, with 13 in place of 52.

Without replacement

Real games rarely return cards to the deck, so consider dealing cards without replacement. Now an exact repeat of a card is impossible, but a rank match is not. The chance that n cards dealt from one deck contain at least one pair of equal rank is:

Cards dealt Chance of at least one pair or better
2 about 5.9%
3 about 17.2%
4 about 32.4%
5 about 49.3%
6 about 65.5%
7 about 79.0%

Here a pair or better is more likely than not by the sixth card. Compared with replacement, it takes a little longer, because once a card is dealt, only 3 cards of its rank remain among the other 51, a slightly smaller share than 4 of 52. This is the effect of drawing without replacement. The 5-card figure of 49.3% agrees with the poker hand counts: roughly half of five-card hands contain at least a pair.

A different puzzle: matching two shuffled decks

Another famous coincidence involves two decks. Shuffle two decks and turn over cards one pair at a time. What is the chance at least one pair is identical in rank and suit?

Intuition says it should be small, since a given position matches with probability 1/52. But there are 52 positions, and the expected number of matches is 52 x 1/52 = 1. The chance of at least one match is approximately 1 - 1/e, which is about 63.2%. The exact value for 52 cards is extremely close to this limit. This is an example of how many small chances add up to something large, and the exact calculation relies on the inclusion-exclusion principle, which handles events that overlap. The 63.2% figure is the proportion of such double-deck trials, over a long run, that have a match; a single trial can go either way.

What this says about coincidences

Three lessons follow:

  1. Counting pairs, not cards. Coincidences feel unlikely because we compare one card to one target. The relevant number is how many pairs could match.
  2. Unremarkable events add up. A hand with a surprising feature is usually one of many possible surprising features. Most players eventually see a “remarkable” hand, which says little about whether the deck is fair.
  3. Complements are easier. Computing “no repeat” first is a standard use of complement counting.

The usual caution about coincidences applies in gambling settings. A repeated card or a striking pattern does not mean the next draw is more or less likely to repeat; a reshuffled deck has no memory, and games with a house edge lose over time regardless of any pattern a player thinks they see. If playing cards stops being fun or begins to cause problems, support is available from local services.

The complete guide to card games and counting

How a 52-Card Deck Shapes Every Card Game Probability
Read the guide

Keep exploring

Guides from other topics

All topics →