How many people need to be in a room before two share a birthday with better-than-even odds? Not 183. Just 23. That's the birthday paradox — and almost nobody guesses it right.
The birthday paradox (or birthday problem) asks: in a group of n people, what's the probability that at least two share a birthday? The answer grows shockingly fast.
It's the maths behind hash collisions, cryptographic attacks (the 'birthday attack'), and a great lesson in how human intuition mis-estimates probability.
Why so few people?
Don't count people — count *pairs*. With 23 people there are C(23, 2) = 253 pairs, each with a 1/365 chance of matching. That's a lot of chances. The probability *no* pair matches drops below 50% at n = 23.
Compute the chance everyone is *different*, then subtract from 1.
Roughly what's the probability with 50 people?
What about 'someone shares MY birthday'?
That's a different, much weaker question. For a 50% chance someone matches *your specific* birthday, you need about 253 people — the number most people wrongly guess for the original problem.
'At least two people share a birthday' ≠ 'someone shares my birthday'. The first counts all pairs (huge); the second fixes one date (small). Mixing them up is the heart of the 'paradox'.
The same maths gives the birthday attack in cryptography: finding two inputs with the same hash is far easier than finding an input matching a *given* hash — roughly the square root of the brute-force cost.
- Only 23 people → >50% chance two share a birthday.
- The trick: count pairs, not people — there are far more pairs than you think.
- Powers the birthday attack on hash functions.