Home > Riddles > The shared birthday

The shared birthday

Intuition usually imagines a much larger room. But it is not about matching a specific date, but about any pair of people matching.

There are several people in a room. We will assume that birthdays are distributed evenly over the 365 days of the year and that there are no leap years.

How many people are needed, at least, for the probability that at least two share a birthday to be greater than 50%?

Hints

Show hints
  1. It is easier to compute the probability that no two birthdays match.
  2. Multiply step by step: 365/365, then 364/365, then 363/365, ...
  3. When that product drops below 0.5, the complementary probability rises above 0.5.

Solution

Show full solution

Answer: 23 people are needed. It is easier to calculate the opposite probability: that everyone has different birthdays. With a person there is no restriction. The second must have a birthday on a different day: $$
\frac{364}{365}.

$$ The third must avoid the two previous birthdays: $$

\frac{363}{365}.

$$ And so on. For $n$ people, the probability that they all have different birthdays is: $$

\frac{365}{365}\cdot\frac{364}{365}\cdot\frac{363}{365}\cdots\frac{365-n+1}{365}.

$$ With 22 people, the probability of there being at least one match is still less than 50%. With 23 people, the probability that they all have different birthdays drops to approximately: $$

0{,}493.

$$ Therefore, the probability that at least two share a birthday is: $$

1-0{,}493=0{,}507.
$$ That is, approximately 50.7%. So the minimum number of people needed is 23.

Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: Hilbert I's Hotel · Next: The choice optimal →