Puzzles and Paradoxes

The Birthday Problem: Why 23 People Is Enough

Why a shared birthday among just 23 people has a probability of about 50.7 percent, worked out through the complement and the count of possible pairs.

On this page
  1. The question
  2. Assumptions
  3. Counting the opposite
  4. Why the answer is so small
  5. Some values
  6. Why it matters beyond birthdays
  7. A caution on interpretation

The question

How many people must be in a room before it is more likely than not that two of them share a birthday? Most people guess a large number, often 183, which is about half of 365. The actual answer is 23. With 23 people the chance of at least one shared birthday is about 50.7 percent.

The result is called a paradox only because it feels wrong. There is nothing inconsistent in it. The puzzle shows how badly intuition handles quantities that grow through combinations.

Assumptions

To make the calculation clean, we assume:

  • There are 365 possible birthdays, ignoring 29 February.
  • Each birthday is equally likely for each person.
  • People’s birthdays are independent of each other, so there are no twins in the room.

Real birthdays are not perfectly evenly spread, but this does not change the picture much. Uneven distributions tend to make shared birthdays slightly more likely, not less.

Counting the opposite

The direct question, “at least one shared birthday”, is awkward to calculate because there are many ways it can happen. The complement rule gives a shortcut: find the probability that nobody shares a birthday, then subtract from 1.

Build the room one person at a time.

  • The first person can have any birthday: probability 365/365.
  • The second person must avoid the first person’s birthday: 364/365.
  • The third must avoid both earlier ones: 363/365.
  • And so on, until the 23rd person, who must avoid 22 birthdays: 343/365.

The chance that all 23 differ is the product:

(365/365) × (364/365) × (363/365) × … × (343/365)

This product is about 0.4927. Each factor is slightly less than 1, and 22 factors multiplied together shrink the total to just under one half. Subtracting from 1 gives 1 − 0.4927 = 0.5073, so about 50.7 percent.

Why the answer is so small

The main reason is the number of pairs. A shared birthday can occur between any two people, not just between one person and you. The number of pairs among n people is n × (n − 1) ÷ 2. For 23 people that is 23 × 22 ÷ 2 = 253 pairs.

Each pair has a chance of 1/365, roughly 0.27 percent, of matching. That is tiny for any one pair, but with 253 pairs the chances accumulate. The pairs are not independent, so you cannot simply multiply 253 by 1/365 and call it the answer, since that gives about 69 percent, which is too high. But the rough picture is right: the number of pairs grows quickly, much faster than the number of people.

Most people confuse the question with a different one: “how many people do I need so that someone shares my birthday?” That version really does need many more people. For a better-than-even chance of matching one specific birthday, you need about 253 people. The difference between “someone matches me” and “any two match” is the entire puzzle.

Some values

For the same assumptions, the approximate probability of at least one shared birthday is:

People Chance of a shared birthday
10 about 11.7%
20 about 41.1%
23 about 50.7%
30 about 70.6%
50 about 97%
70 about 99.9%

By 70 people it is close to certain, even though 70 is nowhere near 365. These are the standard figures under the assumptions above.

Why it matters beyond birthdays

The same reasoning applies whenever many items are compared against each other. In computing, it is the reason that random identifiers or hash values can collide sooner than expected. The pigeonhole principle guarantees a repeat once the count passes the number of possible values, but the birthday problem shows that repeats become likely much earlier than that.

It also explains why coincidences in a large group are less remarkable than they feel. In a crowd of people, something shared by some pair is likely, even if any particular named coincidence is not. That is a theme in coincidence myths, where the surprise comes from noticing one match and forgetting how many pairs there were to notice.

A caution on interpretation

The 50.7 percent figure describes a typical group under the stated assumptions. It does not say that any particular room of 23 people will have a match; in about half of such rooms there will not be one. It is also a statement about probability, not a way to predict or profit from outcomes in any game of chance.

If you want to test it, you can run a probability simulation: generate 23 random birthdays, check for a repeat, and do this many thousands of times. The share of runs with a repeat should come out close to 50 percent, though any single batch will vary.

The complete guide to puzzles and paradoxes

Classic Probability Puzzles and Why They Trick Us
Read the guide

Keep exploring

Guides from other topics

All topics →