Numbers · 3 min read
The Birthday Paradox: Why 23 People Is Enough
In a room of just 23 people, it's more likely than not that two share a birthday. Why it's true, the maths in plain steps, and a room to check it.
By the Cognosc team ·
How many people do you need in a room before it’s more likely than not that two of them share a birthday? Most people guess somewhere between 100 and 183. The answer is 23.
With 50 people it’s 97%. With 70, it’s 99.9%. It’s called a paradox only because it’s so far from what we expect.
Try it
How many people until two share a birthday?
Slide the number of people in the room, then fill a room and check.
With 23 people there are 253 different pairs, and a 50.7% chance that at least two share a birthday.
Why intuition gets it wrong
When people picture this, they usually picture themselves: what’s the chance someone shares my birthday? That really is small. In a room of 23, it’s only about 6%.
But the question isn’t about you. It’s about any two people in the room. And the number of pairs of people grows much faster than the number of people.
Count the pairs
In a room of 23 people, each person can be paired with 22 others. That’s 23 × 22 = 506, but that counts every pair twice (Ann and Bob, and Bob and Ann), so there are 253 different pairs.
Each pair has a 1 in 365 chance of sharing a birthday. With 253 chances at a 1 in 365 event, a match stops looking unlikely.
The exact calculation
It’s easiest to work out the chance that nobody shares a birthday, then take that away from 1.
- The first person can have any birthday.
- The second must avoid the first: 364 out of 365 days work.
- The third must avoid both: 363 out of 365.
- …and so on, down to the 23rd person: 343 out of 365.
Multiply those together: 364/365 × 363/365 × … × 343/365 comes to about 0.493. So the chance that nobody matches is 49.3%, and the chance that at least two people do is 50.7%.
This trick, working out the chance that something doesn’t happen and taking it from 1, is one of the most useful tools in probability. The chance of “at least one” is often much easier to reach through “none”.
Does it work in real life?
Yes, and if anything real rooms match slightly more often. The calculation assumes birthdays are spread evenly across the year, but real birthdays bunch up a little in certain months, which makes matches a bit more likely. Try it in any class or office of 30 people; more often than not, you’ll find a pair.
Where the same idea turns up
- Coincidences. “What are the chances?” is usually the wrong question. With enough people and enough possible coincidences, some are bound to happen.
- Computer security. A “birthday attack” uses the same maths to find two inputs that scramble to the same output far faster than you’d expect.
- Lottery numbers repeating, two friends bumping into each other abroad, the same song coming up twice on shuffle: all easier than they feel.
Test yourself
The birthday question is one of ten classic traps in the free probability test.