In a room of 23 people, how likely is it that two share a birthday?

Probability
Easy
A probability puzzle that the complement rule solves.
Published

November 16, 2026

NoteQuestion

A room holds 23 people. Each birthday is equally likely to be any of 365 days, independently of the others, and nobody is born on 29 February. What is the probability that at least two of them share a birthday?

Try it first, then open the solution.

The answer is 0.507, a little better than even.

By the complement rule, the answer is 1 minus the chance that all 23 birthdays differ. Each new person must avoid the birthdays already taken, so the second person avoids 1 day, the third 2 days, and the 23rd avoids 22 days:

\[\begin{aligned} &P(\text{all different}) \\ &\quad = \frac{365}{365} \times \frac{364}{365} \times \cdots \times \frac{343}{365} = 0.493, \end{aligned} \tag{1}\]

so

\[P(\text{at least two share}) = 1 - 0.493 = 0.507. \tag{2}\]

The answer feels high because 23 people form \(23 \times 22 / 2 = 253\) pairs, and each pair can share a birthday.

The common wrong answers each count the wrong chances:

Answer The slip
23/365 ≈ 6% adds the people, but every pair is a chance
1 − (364/365)²² ≈ 5.9% counts only the matches with one person’s birthday
183 people for 50% halves 365, which compares people to days
p_all_different = 1
for k in range(23):
    p_all_different *= (365 - k) / 365

print(round(p_all_different, 3), round(1 - p_all_different, 3))
0.493 0.507