The hook
Gather 23 random people in a room. What are the odds that two of them share a birthday — same day, same month?
With 365 days to go around, 23 people feels nowhere near enough. Most guess something small — 5%, maybe 10%. The real answer is just over 50%. It’s a literal coin flip. Let’s feel why.
Fill the room
Drag the slider to change how many people are in the room. The big number is the true probability of a shared birthday; the chips below are one randomly sampled room — matches light up.
← 23 people: the famous coin-flip tipping point
This random room: no match this time — reshuffle.
Make a prediction
Here’s the flip side: how many people would you need for a 99% chance of a shared birthday? Most people guess hundreds. Lock in a number.
Run a thousand
Don’t trust the formula — test it. Each trial builds a fresh room of 23 random people and checks for a collision.
Each trial is a brand-new room of 23 random people. Run a thousand and watch the share of rooms-with-a-match settle right around 50.7%.
The reveal
The trick: it’s not about people, it’s about pairs.
Your gut quietly answers a different question — “does someone share my birthday?” That really would need hundreds of people. But the actual question is whether any two people match, and the number of pairs grows shockingly fast.
The clean way to compute it is to flip the question: find the probability that nobody matches and subtract from 1. Each new person must dodge all the birthdays already taken — — and that product collapses quickly. Here’s the full curve:
The math, gently
Here’s the trick that makes this tractable: don’t count the matches — count the opposite. Work out the chance that nobody shares a birthday, then subtract from 1. That path is far easier to build up one person at a time.
The first person can land on any day. The second has to dodge that one taken day, so they avoid it with probability . The third must dodge two days (), the fourth three (), and so on. Multiply those dodges together and you get the probability that the whole room stays collision-free.
So why does it feel so wrong? Because our gut pictures someone matching me — one fixed birthday against the crowd. But the real test is whether any pair matches. With n people there are pairs, and that grows fast.
Plug the numbers in and it lands where the slider promised: n = 23 gives ≈ 50.7%, and by n = 70 you’re at a near-certain ≈ 99.9%. The formula and the intuition finally agree.
Check yourself
Why does it take only ~23 people, not ~183 (about half of 365), to reach a 50% chance of a shared birthday?
How is 'does anyone in the room share a birthday?' different from 'does anyone share MY birthday?'
What's the cleanest way to compute the chance of at least one shared birthday?
Where it shows up
This isn’t just a party trick. The same math powers the birthday attack in cryptography: finding two inputs that hash to the same value takes only about √N tries, not N — which is exactly why secure hashes need so many bits. Collisions are always closer than they look.
