PickRandom Logo

PickRandom

Science

The Birthday Paradox Explained: Why 23 People Share a Birthday

The birthday paradox shows that in a group of just 23 people, there is a 50% chance two share a birthday. Learn why this surprising result is mathematically correct.

Quick Answer: In a group of just 23 randomly chosen people, there is approximately a 50.7% probability that at least two people share a birthday. With 70 people, the probability rises to over 99.9%. This counterintuitive result is the Birthday Paradox.

Why This Seems Wrong

Most people guess you would need far more than 23 people to have a 50% chance of a shared birthday. There are 365 days in a year — shouldn't you need around 183 people (half of 365)? The key insight is that we are not asking if anyone shares YOUR birthday — we are asking if ANY two people among the entire group share any birthday. The number of pairs grows much faster than the group size.

The Mathematics

With 23 people, there are C(23,2) = 253 unique pairs. Each pair has a 1/365 chance of sharing a birthday. While these checks are not independent, the probability of at least one match across 253 pairs is surprisingly high. The formal calculation: P(at least one match) = 1 - P(no match) = 1 - (365/365 × 364/365 × 363/365 × ... × 343/365).

Group SizeProbability of Shared Birthday
1011.7%
2041.1%
2350.7%
3070.6%
4089.1%
5097.0%
7099.9%

Real-World Applications of the Birthday Paradox

The birthday paradox has critical implications in cryptography. If a hash function produces 64-bit outputs, an attacker only needs to compute approximately 2^32 hashes (not 2^64) to find a collision (two inputs with the same hash) — a "birthday attack." This is why modern cryptographic hashes use 256-bit outputs despite 128 bits seeming like more than enough.

Frequently Asked Questions

Why do only 23 people need a 50% chance of a shared birthday?

Because we are checking all possible pairs, not just pairs with you. With 23 people, there are 253 unique pairs — and each pair has a chance of sharing a birthday. The many pairs quickly accumulate to a high probability of at least one match.

Does the birthday paradox assume birthdays are evenly distributed?

The classic calculation assumes uniform birthday distribution (equal probability for all 365 days). In reality, birthdays cluster slightly (more births in some months), which actually increases the probability of a shared birthday above the classical estimate.

How does the birthday paradox apply to cryptography?

In a "birthday attack," an attacker exploits the birthday paradox to find hash collisions much faster than brute force. For an n-bit hash, a collision can be found with ~2^(n/2) computations — not 2^n. This is why cryptographic hashes use large output sizes (256-512 bits).