Birthday problem — probability that 2 of 23 people share a birthday

hard CBSE JEE-MAIN 3 min read

Question

In a group of 23 people, what is the probability that at least two of them share the same birthday? (Assume 365 days in a year, all birthdays equally likely.)

Solution — Step by Step

Directly calculating P(at least two share a birthday) is messy because we’d need to count every possible way two or more people can match. Instead, we calculate the complement: P(all 23 birthdays are different), then subtract from 1.

P(at least one shared birthday)=1P(all birthdays distinct)P(\text{at least one shared birthday}) = 1 - P(\text{all birthdays distinct})

Person 1 can have any of 365 birthdays. Person 2 must avoid person 1’s birthday — 364 choices. Person 3 must avoid the first two — 363 choices. We continue this for all 23 people.

P(all distinct)=365365×364365×363365××343365P(\text{all distinct}) = \frac{365}{365} \times \frac{364}{365} \times \frac{363}{365} \times \cdots \times \frac{343}{365}

That last fraction is 36523+1365=343365\frac{365 - 23 + 1}{365} = \frac{343}{365}.

P(all distinct)=365×364×363××34336523P(\text{all distinct}) = \frac{365 \times 364 \times 363 \times \cdots \times 343}{365^{23}}

This equals 365P2336523\dfrac{{}^{365}P_{23}}{365^{23}}, using permutation notation.

Working through the product (or using logarithms):

P(all distinct)0.4927P(\text{all distinct}) \approx 0.4927

So the probability that at least two people share a birthday is:

P(at least one match)=10.49270.5073P(\text{at least one match}) = 1 - 0.4927 \approx \mathbf{0.5073}

With just 23 people, the probability exceeds 50%. That’s the counter-intuitive punch of the birthday problem — our brains underestimate how many pairs form in a group.

23 people create (232)=253\binom{23}{2} = 253 pairs, and each pair has a 13650.27%\frac{1}{365} \approx 0.27\% chance of matching. With 253 independent-ish chances, a match becomes more likely than not.

Why This Works

The key insight is complementary counting. Instead of summing over all messy cases where at least two people share a birthday, we ask: what does a “no match” scenario look like? It’s much cleaner — each new person simply avoids all previously seen birthdays.

The reason 23 feels shockingly low is that we instinctively compare one person to ourselves (1 pair). But 23 people form 253 pairs. That’s the combinatorial explosion doing the work.

For a group of nn people, the probability that at least two share a birthday exceeds 50% when n23n \geq 23, and exceeds 99% when n57n \geq 57. These are worth memorising for MCQs.

Alternative Method

We can approximate using the Poisson model. The expected number of matching pairs is:

λ=(n2)1365\lambda = \binom{n}{2} \cdot \frac{1}{365}

For n=23n = 23: λ=253×13650.693\lambda = 253 \times \frac{1}{365} \approx 0.693.

Under the Poisson approximation, P(no match)eλ=e0.6930.5P(\text{no match}) \approx e^{-\lambda} = e^{-0.693} \approx 0.5, so P(match)0.5P(\text{match}) \approx 0.5. This matches our exact answer closely and is much faster to compute in an MCQ setting.

Common Mistake

Students often compute P(a specific person matches someone)=223656%P(\text{a specific person matches someone}) = \frac{22}{365} \approx 6\% and conclude the probability is low. This only measures one person’s matches. We need to consider ALL pairs — any two people in the room can match, not just you versus everyone else.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next