How many people do you need for two to share a birthday?

Just 23 for a better-than-even chance, and 70 for 99.9%. It feels too small because we picture someone matching our own birthday. But 23 people make 253 pairs, and every pair is a chance. It's easiest to find the chance that nobody matches, then subtract it from 1.

50% at 23 people30 people: 70.6%any two matchsomeone matches you
Chance two people match
70.6%
Chance someone matches you
7.65%
Pairs of people
435
People needed for a 50% chance
23

Challenge: Reach a 99% chance of a shared birthday with 60 people or fewer.

Play

Slide from 10 people up to 60 and watch the curve shoot up. Compare it with the chance someone matches you.

Challenge: Reach a 99% chance of a shared birthday with 60 people or fewer. The box under the picture turns green when you get it.

Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”

Understand

P=1−365365⋅364365⋯365−n+1365P = 1 - \frac{365}{365}\cdot\frac{364}{365}\cdots\frac{365 - n + 1}{365}

It's easier to find the chance that nobody matches. The second person must miss the first, the third must miss both, and so on:

P(no match)=365365⋅364365⋯365−n+1365P(\text{no match}) = \frac{365}{365}\cdot\frac{364}{365}\cdots\frac{365 - n + 1}{365}

Subtract it from 1 for the chance of a match. The curve crosses 50% at just 23 people, because 23 people make 253 pairs. The lower curve is the chance that someone matches you, which rises far more slowly.

Use

Every input has a unit menu, so you can type values in the units you already have. Results follow your units.

Show the work

  1. Easier to find the chance of NO match: each new person must miss everyone beforeP(\text{no match}) = \frac{365}{365}\times\frac{364}{365}\times\cdots = 0.2937
  2. Then flip itP = 1 - \frac{365}{365}\cdot\frac{364}{365}\cdots\frac{336}{365} = 70.63\%
  3. Why so high: count the pairs\binom{30}{2} = \frac{30\times29}{2} = 435\ \text{pairs}
  4. Matching you specifically: only the others count1 - \left(\frac{364}{365}\right)^{29} = 7.648\%

Export

Export PDF

Set the group size and what has to match.

  • Every value is treated as equally likely.

For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.

Cheat card

P(no match)=365365⋅364365⋯365−n+1365P(\text{no match}) = \frac{365}{365}\cdot\frac{364}{365}\cdots\frac{365 - n + 1}{365}
P(match)=1−P(no match)P(\text{match}) = 1 - P(\text{no match})
pairs=(n2)=n(n−1)2\text{pairs} = \binom{n}{2} = \frac{n(n - 1)}{2}
SymbolMeaningUnit
nnpeople in the room
PPchance at least two match
  • Count the chance of no match, then flip it. That's easier than counting all the ways to match.
  • Pairs grow like n², which is why the chance climbs so fast.
  • Matching you in particular needs about 253 people for 50%.

Print this card

Where it’s used

  • Computer Science
    Programmers use it to size ID codes and hashes so two items rarely get the same one.
  • Biology
    The same math estimates how often DNA markers match by chance.
  • Sports & Games
    On a soccer field with both teams and the referee, it’s about even odds that two share a birthday.

Questions people ask

Why is it called a paradox?

It isn't really one. It just surprises people, because we think about matching our own birthday instead of any pair in the room matching.

How many people guarantee a shared birthday?

366, ignoring leap days. With more people than days, two must share. That's the pigeonhole principle.

Does it work with real birthdays, which aren't spread evenly?

Yes, and uneven birthdays make a match slightly more likely, since some dates are more crowded.