An interactive showing · Pattern
Twenty-Three People
How many people need to be in a room before two of them probably share a birthday? Most people guess somewhere near 180 — half of 365. The real answer is 23. Add people to the room below one at a time and watch the coincidence arrive far sooner than it feels it should.
A room of 23 people · one column per day of the year
The curve below is the exact probability for every room size. It rises shockingly fast: past 50% at 23 people, past 99% at 57, and it is essentially certain by 70 — long before you get near 365.
P(shared birthday) vs room size
Why it feels impossible
The trick your intuition plays: you picture your own birthday and ask how many people it takes for someone to match it. That is a different question with a much slower answer — you'd need 253 people for a better-than-even chance someone shares your day (the faint lower curve above). But the room doesn't care about your birthday. It cares about every pair at once: 23 people make 23·22/2 = 253 pairs, and it only takes one of them to match. Same number, 253 — once as people, once as pairs — and that coincidence is the whole illusion.
The check
The probability that no two of n people share a birthday is each new person missing all the days already taken; the chance of a match is one minus that:
P(n) = 1 − (365/365)·(364/365)·(363/365)···(365−n+1)/365
Every percentage on this page is that product, computed live in your browser, and the live simulation beside it deals out actual random birthdays into thousands of rooms — it converges onto the same number, which is the formula proving itself in front of you. Offline, research/the-birthday-problem/verify.mjs checks all of it three independent ways: the product formula against a log-gamma computation (agree to <10⁻¹²), a 200,000-room Monte-Carlo (matches to <0.005), and the landmarks — 23 is the first crossing of ½ (P(22)=47.6%, P(23)=50.7%), P(57)=99.0%, P(70)=99.92%, P(366)=1 by pigeonhole, and the "your birthday" curve crossing ½ at exactly 253. All pass.
Where this shows up
The same maths — collisions arriving near √N rather than N — is why hash tables collide sooner than you'd expect, why the "birthday attack" can forge a digital signature in ~2n/2 tries instead of 2n, and why coincidences in general are systematically underrated: there are far more pairs of things than things, and a coincidence only needs one pair.