STEMviz
Free lesson · no sign-up

23 people are enough for a 50% chance of a shared birthday.

Count the opposite event, multiply the probabilities, and see why pairs — not people — are what matter.

High School Mathematics · Free lesson · ~5 min
The cheat sheet
  • P(all different) = 365/365 · 364/365 · … · (365 − n + 1)/365.
  • P(shared birthday) = 1 − P(all different): 50.7% for n = 23, 97% for n = 50.
  • 23 people make C(23, 2) = 253 pairs, and (1 − 1/365)²⁵³ ≈ 0.5.
  • Matching YOUR birthday is much rarer: about 6% among 22 others.
  • Certainty needs 366 people (pigeonhole principle).

1. The question

How many people must be in a room for the chance that some two of them share a birthday to be above 50%? Most people guess around 180 (half of 365). The answer is 23.

Assume 365 equally likely birthdays (ignore 29 February) and people whose birthdays are independent — no twins.

2. Count the opposite event

"At least two share a birthday" can happen in very many ways. Its opposite — all birthdays different — is easy to count, person by person:

  • the 1st person can have any day: 365365\frac{365}{365};
  • the 2nd must avoid that day: 364365\frac{364}{365};
  • the 3rd must avoid two days: 363365\frac{363}{365};
  • … the nn-th must avoid n−1n - 1 days: 365−n+1365\frac{365 - n + 1}{365}.

The events are independent, so the probabilities multiply:

P(all different)=365365⋅364365⋯365−n+1365=365!(365−n)!  365nP(\text{all different}) = \frac{365}{365}\cdot\frac{364}{365}\cdots\frac{365-n+1}{365} = \frac{365!}{(365-n)!\;365^n} P(a shared birthday)=1−P(all different)P(\text{a shared birthday}) = 1 - P(\text{all different})

3. Plug in the numbers

  • n=10n = 10: P≈11.7%P \approx 11.7\%
  • n=20n = 20: P≈41.1%P \approx 41.1\%
  • n=23n = 23: P≈50.7%P \approx 50.7\% — the first nn above one half
  • n=30n = 30: P≈70.6%P \approx 70.6\%
  • n=50n = 50: P≈97.0%P \approx 97.0\%
  • n=70n = 70: P≈99.9%P \approx 99.9\%

4. Why so few? Count the pairs

A shared birthday needs only some pair of people to match — and the number of pairs grows much faster than the number of people:

(n2)=n(n−1)2,(232)=253\binom{n}{2} = \frac{n(n-1)}{2}, \qquad \binom{23}{2} = 253

Each pair matches with probability 1365\frac{1}{365}. Treating the pairs as roughly independent,

P(all different)≈(1−1365)253≈e−253/365≈0.50P(\text{all different}) \approx \left(1 - \frac{1}{365}\right)^{253} \approx e^{-253/365} \approx 0.50

which reproduces the exact answer. The surprise comes from thinking about your own birthday instead of all pairs: the chance that one of 22 others shares your birthday is only 1−(364365)22≈5.9%1 - \left(\frac{364}{365}\right)^{22} \approx 5.9\%, and you would need about 253 other people to push that to 50%.

5. Certainty

Only with 366 people is a shared birthday guaranteed: 366 people can't all fit into 365 days (the pigeonhole principle). Probability reaches 99.9% long before that, at 70.

The same maths is why computer scientists worry about "collisions" in hash functions: with NN possible values, a repeat becomes likely after only about N\sqrt{N} tries.

Check your understanding · 5 questions

Conceptual Quiz

Tempting answers throughout. Commit to a choice before revealing the reasoning — recognising your own misconception is worth far more than a lucky guess.

The threshold

What is the smallest number of people for which the probability that at least two share a birthday exceeds 50%?

Select an option to reveal the explanation.

Small groups

Three people meet. What is the probability that at least two of them share a birthday?

Select an option to reveal the explanation.

Why it works

What best explains why so few people are needed?

Select an option to reveal the explanation.

Your own birthday

You are in a room with 22 other people. What is the probability that at least one of them shares your birthday?

Select an option to reveal the explanation.

Certainty

How many people guarantee (probability 100%) that two share a birthday, ignoring 29 February?

Select an option to reveal the explanation.

Black Friday: lifetime access up to 50% off · until December 1
Liked this? Keep going

Get all of High School Mathematics

This free lesson covers one topic. The course has 60 full chapters, each with a simulation to play with, the full theory with derivations, exam questions where every option is explained, practice problems with hints and worked solutions, flashcards and saved progress.

Continue with these chapters:
  • Fundamentals of Probability - Dependent and Independent Events
  • Conditional Probability and Bayes' Theorem
  • Discrete Random Variables and the Binomial Distribution
  • Continuous Random Variables and the Normal Distribution
$13.99/monthFirst 3 days free · cancel in one click
Secure checkout by Lemon Squeezy, our merchant of recordSee all 60 chapters of High School Mathematics →
Not ready yet?

Get free lessons by email

One email every few days. Unsubscribe in one click.