Curious math · Probability
Just 23 people, and a better-than-even chance two share a birthday?
This puzzle appears in Alice in Borderland season 3
In the series Alice in Borderland, season 3, game 2 (“Sacred Fortunes”) asks: “How many people must there be for the chance that 2 of them share a birthday to go over half (50%)?” with the choices 23 · 78 · 183 · 365 people · pick one before you read on
This page only explains the math of the question · it is not connected with the makers of the series
Short answer: yes (under the assumptions below). A group of 23 people has a 50.7% chance that at least 1 pair shares a birthday (same day + month, any birth year) · a class of 40: about 89.1%
What “share a birthday” means
It means the same day and month, e.g. 9 Mar and 9 Mar (different birth years still count) · not just both being born on a Monday, and not the same date in different months
The definition matters a lot: counting only the day of the week (Monday–Sunday, 7 equally likely options), just 4 people already give a 65.0% chance of a match, and 8 people guarantee one · day + month has as many as 365 options, so it takes more people
Why it sounds strange
We tend to think “does anyone share my birthday?”, but this question is about “any pair at all” · 23 people make as many as 253 pairs (23 × 22 ÷ 2) · with that many pairs, the chance that some pair matches is higher than it feels
How to count 253 pairs
Count it as handshakes: every pair shakes hands 1 time
- Start small: 3 people (A B C) give A–B · A–C · B–C = 3 pairs · 4 people (A B C D) give A–B · A–C · A–D · B–C · B–D · C–D = 6 pairs
- 23 people: person 1 shakes hands with the other 22 · person 2 with the 21 not yet greeted · person 3 with 20 more · … · the second-to-last has 1 left ⇒ 22 + 21 + 20 + … + 1 = 253 pairs
- Shortcut: everyone shakes hands with 22 others ⇒ 23 × 22 = 506 · but “A greets B” and “B greets A” are the same pair, counted 2 times ⇒ 506 ÷ 2 = 253
Each pair = 1 chance for a matching birthday · with as many as 253 pairs, the chance that some pair matches is higher than it feels (but you can’t simply add the chances; the right way is in the next section)
How to work it out
Work backwards: find the chance that nobody matches at all, then subtract it from 1
- Person 2 must miss the first person: 364/365
- Person 3 must miss the first 2: 363/365
- … up to person 23: 343/365
- Multiply them all ≈ 0.4927 (no match at all: 49.3%) ⇒ a match ≈ 1 − 0.4927 = 0.5073 = 50.7%
Try it
Choose how many people, then “simulate a room” to see whether any pair shares a birthday (random, assuming 365 equally likely days)
Why the other choices in the series are wrong
| Choice | Chance of a shared birthday | Why people pick it / why it’s wrong |
|---|---|---|
| 23 people | 50.7% | ✓ the answer · the first number to go over half (22 people give only 47.6%) |
| 78 people | 99.986% | far past half · the chance of no match is only about 0.014% |
| 183 people | almost 100% | the “half a year” trap (365 ÷ 2 rounded up = 183) · the chance of no match at all is about 4.8 × 10−25 |
| 365 people | almost 100% (still not exactly 100%) | the “every day must be covered” trap · the chance of no match is about 1.5 × 10−157 · a 100% certainty needs 366 people (next section) |
“How many people to pass half?” is very different from “how many people to be certain?”, and from “does anyone share my birthday?” (that takes 253 people · see the last section)
Table of chances (365 equally likely days)
| People | 5 | 10 | 20 | 23 | 30 | 40 | 50 | 57 | 60 | 70 |
|---|---|---|---|---|---|---|---|---|---|---|
| Chance of a match | 2.7% | 11.7% | 41.1% | 50.7% | 70.6% | 89.1% | 97.0% | 99.0% | 99.4% | 99.9% |
It takes 366 people (ignoring 29 Feb) or 367 people (counting 29 Feb) to be 100% certain, because there aren’t enough days for everyone to be different (the pigeonhole principle · pigeonhole principle)
If the question is “does anyone share my birthday?”
With 22 other people, the chance is only 5.9% (1 − (364/365)22) · you need 253 other people to pass half: the number 253 turns up again
Assumptions used (important)
- A year has 365 days, ignoring 29 Feb · every day is equally likely to be a birthday · birthdays are independent (no twins)
- In real life birthdays are not spread evenly over the days · it can be proved that the “equal every day” case gives the lowest chance of a match ⇒ real groups match at least as easily as the numbers on this page
The math behind it
- Directly: probability · the multiplication principle · complementary events (complement) · counting pairs (combinations, choosing 2 from n)
- Behind the scenes: computer scientists use the same idea to estimate how soon short codes (hashes · hash) collide, the so-called birthday attack
References
- Wikipedia: Birthday problem
- Windows on Theory: Birthday paradox today (2012)
- TheSmartLocal: the math questions in Alice in Borderland season 3 (2025)
Accessed 12 and 15 Nov 2026 · the numbers on this page were computed from the formulas ourselves