1. The problem
How many people must be in a room so that a shared birthday is 99.9 % certain?
The question hides a trap in its wording. "A common birthday" can mean two quite different things:
- Any pair — at least two people in the room (any two) were born on the same day.
- Your birthday — at least one other person was born on the same day as you.
Most people's intuition mixes the two up, and that is exactly why the classic answer feels "wrong". We assume 365 equally likely birthdays and ignore 29 February.
2. The answer (two of them)
Same question, same 99.9 %, but answers that differ by a factor of 36. The "any pair" room fits in a classroom; the "your birthday" room needs a large auditorium.
3. Any two people match
It is far easier to compute the chance that nobody matches, then subtract from 1. Seat people one at a time:
- Person 1 can have any birthday: 365/365.
- Person 2 must avoid person 1's day: 364/365.
- Person 3 must avoid two days: 363/365 … and person n must avoid n−1 days.
We need P(no match) ≤ 0.001. Multiplying the factors out: at n = 69 it is still 0.00104, and at n = 70 it falls to 0.00084. So 70 is the smallest room.
A quick approximation
Each factor (1 − k/365) ≈ e−k/365, so P(no match) ≈ e−n(n−1)/730. Setting this to 0.001 gives n(n−1) ≈ 730 × ln 1000 = 5043, so n ≈ 71.5. The estimate is slightly high but lands in the right place. The term n(n−1)/2 is simply the number of pairs in the room, and that is the real secret.
4. Someone matches you
Now only comparisons with you count. Each other person independently misses your birthday with probability 364/365, so with m others:
So 2,518 other people are needed. A handy rule: m ≈ 365 × ln(1000) ≈ 365 × 6.9 ≈ 2,520.
5. Why so different?
In reading A, every pair is a chance for a match. In reading B, only the pairs that include you count.
| People in room | Pairs that can match (any pair) | Pairs that include you |
|---|---|---|
| 23 | 253 | 22 |
| 70 | 2,415 | 69 |
| 2,519 | 3,171,321 | 2,518 |
Look at the 70-person room: it holds 2,415 pairs, roughly the same number of chances as the 2,518 strangers you need in reading B. Pairs grow as n², so a modest room has a huge number of them. (The pairs in reading A are not fully independent, which is why the numbers are close but not identical.)
Milestones
| Target chance | Any pair — people in room | Your birthday — other people |
|---|---|---|
| 50 % | 23 | 253 |
| 90 % | 41 | 840 |
| 99 % | 57 | 1,679 |
| 99.9 % | 70 | 2,518 |
6. Try any room size
Reverse: what target chance?
7. The two curves
8. Fill a room — simulation
Random rooms with the size set in section 6. Each room is tested both ways and the running counts are compared with the exact formula. Watch the estimates settle as more rooms are filled.
Rooms with a match: 0 / 0
Simulated: – Exact: –
Rooms with a match: 0 / 0
Simulated: – Exact: –
Press S to fill one room and see what happened.
9. Fine print
- Leap years: including 29 February (weight ¼ in 366 days) barely moves the answers.
- Real birthdays are not uniform. Births cluster in some months and scheduled deliveries avoid holidays. Any unevenness only raises the chance of a pair match, so 70 is, if anything, a safe upper bound.
- "Exactly one match" ≠ "at least one". All figures here are for at least one shared birthday.
- Where else it appears: hash collisions in computing ("birthday attack"), duplicate serial numbers, and coincidences in large data sets all follow the same n² arithmetic.