St · Statistics & Probability

How to Calculate Card-Matching Probabilities

Published By the 9to5Science editorial team

At a glance

  1. 1. Define a match

    Decide whether a match means the same physical card, the same rank, or another feature.

  2. 2. Set the draw rules

    Specify the deck, number of draws, replacement, and any redraw or stopping rules.

  3. 3. Count outcomes

    Use favorable outcomes divided by equally likely outcomes, or add conditional probabilities for sequential draws.

  4. 4. Check the event

    Make sure the counting matches whether you want an exact match, at least one match, or a particular number.

A card-match probability depends on the rules: matching the same rank is different from matching the same physical card, and drawing with replacement is different from drawing without replacement. Redraw and stopping rules can change the probability as well.

The basic method is to define the event precisely, then count outcomes that satisfy it under the stated rules. The example below compares two common rules for drawing two cards from a standard 52-card deck.

Start with the event and the draw rules

Write down four details before calculating:

  1. Deck: How many cards are available, and how are they divided into types such as ranks or suits?
  2. Match: Does a match mean the same physical card, the same rank, the same suit, or something else?
  3. Replacement: Is a drawn card returned and the deck reshuffled before the next draw?
  4. Redraw or stopping rule: Are matching cards kept, discarded, or drawn again? Does the process stop at the first match?

For equally likely outcomes, the basic formula is

P(M)=number of outcomes satisfying Mnumber of possible outcomes,P(M)=\frac{\text{number of outcomes satisfying }M}{\text{number of possible outcomes}},

where MM is the precisely defined match event. If the draws are not equally likely—for example, because a card is redrawn under a special rule—use conditional probabilities or model the full sequence instead of applying this ratio without adjustment.

Example: two cards with no replacement

Suppose you draw two cards from a standard deck without replacement and call it a match if the cards have the same rank. Once the first card is drawn, 51 cards remain. Exactly 3 of them have the same rank as the first card: there were 4 cards of that rank, and one has already been drawn.

Therefore,

P(same rank)=351=117≈0.0588.P(\text{same rank})=\frac{3}{51}=\frac{1}{17}\approx 0.0588.

The probability is about 5.88%. This calculation works because every possible second card is equally likely, given the first card.

If instead “match” means the same physical card, the probability is zero without replacement: the first card is no longer in the deck.

Example: two cards with replacement

Now return the first card to the deck and reshuffle before the second draw. There are 52 possible second cards, and 4 have the same rank as the first card. Thus

P(same rank)=452=113≈0.0769.P(\text{same rank})=\frac{4}{52}=\frac{1}{13}\approx 0.0769.

If you mean the same physical card, only one of the 52 possible second cards is a match, so the probability is 1/521/52. Replacement makes an exact-card match possible; it does not mean the second card must differ from the first.

Rule for two drawsSame rankSame physical card
Without replacement3/51=1/173/51=1/1700
With replacement4/52=1/134/52=1/131/521/52

A formula for repeated categories in a hand

Sometimes the question is whether a hand contains any repeated category, such as any repeated rank in a five-card hand. Let the deck have NN cards divided into categories, with cic_i cards in category ii. For an unordered hand of mm cards drawn without replacement, the total number of possible hands is (Nm)\binom{N}{m}.

The number of hands with no repeated category is

∑S a set of categories∣S∣=m∏i∈Sci.\sum_{\substack{S\text{ a set of categories}\\|S|=m}}\prod_{i\in S}c_i.

Each such hand selects mm distinct categories and one card from each. So the probability of at least one repeated category is

1−∑∣S∣=m∏i∈Sci(Nm).1-\frac{\displaystyle\sum_{|S|=m}\prod_{i\in S}c_i}{\binom{N}{m}}.

For a standard deck, there are 13 rank categories, each containing 4 cards. For a five-card hand, the number of hands with all different ranks is (135)45\binom{13}{5}4^5. Therefore, the probability of at least one repeated rank is

1−(135)45(525)≈0.493.1-\frac{\binom{13}{5}4^5}{\binom{52}{5}}\approx 0.493.

This event includes hands with a pair, two pairs, three of a kind, a full house, or four of a kind. It is not the probability of getting exactly one pair.

When redraw rules apply

A rule such as “discard any matching card and draw again” changes what counts as an outcome and can change the distribution of the final hand. Specify whether the discarded card returns to the deck and whether the replacement draw can trigger another redraw. For a short sequence, calculate each step conditionally; for a more complex rule, list the possible states and their transition probabilities.

For example, if the first card is kept and you repeatedly draw until you get a different rank, the final card is not an ordinary independent draw from the original deck: matching-rank draws are rejected. The desired probability must reflect that rejection rule.

Common mistakes

  • Leaving “match” undefined: Same rank and same physical card have different probabilities.
  • Using 52 as the second-draw total without replacement: After one card is removed, there are 51 cards left.
  • Confusing “at least one” with “exactly one”: Counting hands with a repeated rank includes hands with multiple matching ranks.
  • Ignoring redraw rules: A redraw can alter which final outcomes are possible and how likely they are.

Once the event and rules are fixed, the calculation is a matter of counting the outcomes those rules actually allow.

References

  1. A First Course in Probability, Sheldon Ross

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.