← All posts

The Birthday Problem: Why 23 People Is Enough

Morgan Voss·

A shelter coordinator with 23 cats on file is running an informal probability experiment. Each cat has a recorded birthday. Most people, if asked to guess the probability that two of these cats share a birthday, land somewhere well below 50%. There are 365 days in a year and only 23 cats. The odds feel long.

They are not long. The probability exceeds 50%. And the reason the intuition fails is worth understanding, because the same failure mode appears in subtler problems.

What Is Actually Being Counted

The mistake is to think about each cat individually. With 23 cats and 365 possible birthdays, any one cat has a 1-in-365 chance of sharing a birthday with any specific other cat. That feels rare. But the question isn't about one cat and one other cat. It's about any matching pair among all 23.

The number of distinct pairs that 23 cats form is:

(232)=23×222=253\binom{23}{2} = \frac{23 \times 22}{2} = 253

Each of those 253 pairs has roughly a 1-in-365 chance of matching. The pairs, not the individual cats, are the unit of analysis.

The Calculation

The cleanest approach works through the complement. Instead of calculating the probability that at least one shared birthday exists, calculate the probability that no shared birthday exists, then subtract from one.

For the first cat, every birthday is distinct by default. For the second cat, 364 of 365 days avoid a match. For the third, 363 of 365. This continues:

P(no shared birthday)=365365364365363365365n+1365P(\text{no shared birthday}) = \frac{365}{365} \cdot \frac{364}{365} \cdot \frac{363}{365} \cdots \frac{365 - n + 1}{365}

Written more compactly:

P(no match in n people)=365!(365n)!365nP(\text{no match in } n \text{ people}) = \frac{365!}{(365 - n)! \cdot 365^n}

Therefore:

P(at least one match)=1365!(365n)!365nP(\text{at least one match}) = 1 - \frac{365!}{(365 - n)! \cdot 365^n}

At n=23n = 23, this works out to approximately 0.5070.507. At n=50n = 50, it reaches 0.9700.970. At n=70n = 70, it's approximately 0.9990.999.

Why the Intuition Fails

The intuition is implicitly asking: what is the probability that a specific person shares a birthday with someone else in the room? That question has a very different answer. For one designated individual, the probability that at least one of the other 22 shares their exact birthday is only about 1(364/365)220.0581 - (364/365)^{22} \approx 0.058.

That's small. That is also not the question. The birthday problem asks whether anyone matches anyone, and the jump from one person's chances to the entire group's chances is where intuition consistently gets lost.

The structure is the same as asking about coincidences generally. We notice when something improbable happens to us. We rarely stop to compute how many chances for improbable things exist in a room full of pairs. The coincidences that don't match us feel invisible.

Non-Uniform Birthdays

The calculation above assumes birthdays are uniformly distributed across the 365 days of the year. They are not. Birth rates vary by season, by day of the week (fewer planned deliveries on weekends), and by year. A non-uniform distribution actually makes matches more likely, not less.

This is a general property: any departure from uniformity concentrates probability mass on some days and away from others, increasing the chance that two people land on the same concentrated day. The 50% threshold with uniform birthdays is a conservative estimate; with real-world birth distributions, you reach it with fewer than 23 people.

The 253-Pair Intuition

The 253-pair framing doesn't give an exact answer but it does give a useful approximation. If each pair independently had a 1/3651/365 chance of matching, the expected number of matching pairs would be 253/3650.69253/365 \approx 0.69. That's greater than one expected match, suggesting the probability of at least one match should be high.

The approximation is rough because the pairs are not independent. A shared birthday between cat A and cat B changes the probability structure for pairs involving either of them. But the rough calculation confirms the direction of the result. When there are 253 chances for something with a 1-in-365 probability to occur, it becomes more likely than not.

That's the birthday problem. Counting individuals obscures the count that matters.

The cats don't charge. The site doesn't either. If something here helped a concept click, a small tip is appreciated.

Buy the Cats a Treat

No PayPal account needed.