Maths in Real Life

The Birthday Paradox: Why 23 People Are Enough for a Shared Birthday

EuclidCurve Smart Team · 2026-11-19 · 5 min read

For young mathematicians in the UK, USA, UAE, Singapore and Hong Kong

Imagine a classroom with 22 other students in it. Is it more likely than not that two people in the room share a birthday?

Guess first: How many people do you need in a room before it is more likely than not that two of them share a birthday? Ignore leap years and assume every birthday is equally likely.

  • About 100
  • About 50
  • About 23

About 23. With 23 people the chance of a shared birthday is about 50.7%. Most people guess close to 100, because they compare each person with one fixed date instead of comparing every person with every other person.

Why it feels wrong

Pick one person. The chance that someone else has the same birthday is 1 in 365, which is tiny, so intuition says a group must be very large. But the question is about any two people in the group. With 23 people there are (23 × 22)/(2) = 253 different pairs, and every pair is a new chance for a match.

Working out the chance

It is easier to find the chance that nobody shares a birthday, then subtract it from 1. The first person can have any birthday. The second must avoid that day: (364)/(365). The third must avoid two days: (363)/(365), and so on. For 23 people the chance of no shared birthday is (365)/(365) × (364)/(365) × \cdots × (343)/(365) ≈ 0.493. So the chance of a shared birthday is 1 - 0.493 = 0.507, about 50.7%.

Your turn

How many different pairs of people can be made from a group of 10 people?

Solution: (10 × 9)/(2) = 45 pairs.

The numbers climb fast

The chance rises quickly: about 11.7% for 10 people, 50.7% for 23, 99.0% for 57 and 99.9% for 70. Once a group is a few dozen people, a shared birthday is almost certain.

Guess first: A school year has 180 students. Roughly how likely is it that two of them share a birthday?

  • About 10%
  • About 50%
  • Practically certain

Practically certain. The chance of no shared birthday among 180 people is far smaller than one in a billion billion, so in almost every school year two students share a birthday.

Where the idea is used

The same idea appears in computer science. When many files or items are given short codes called hashes, two different items can sometimes get the same code, and the number of items needed for that to happen is much smaller than most people expect. Whenever many things are compared in pairs, matches arrive sooner than intuition suggests.

Practice: think in pairs

Guess first: Practice 1: How many different pairs can be made from 5 people?

  • 5 pairs
  • 10 pairs
  • 20 pairs

\binom52 = (5 × 4)/(2) = 10 pairs. Each pair is one chance for a shared birthday.

Your turn

Practice 2: How many different pairs can be made from 30 people?

Solution: (30 × 29)/(2) = 435 pairs.

Guess first: Practice 3: In a room of 10 people, the chance that two share a birthday is about 12%. What is the chance that nobody shares a birthday?

  • About 88%
  • About 12%
  • About 50%

The two events are opposites, so the chance is 1 - 0.117 ≈ 0.883, about 88%.

Your turn

Practice 4: In a group of 367 people (ignore leap years), what is the chance that two share a birthday? Give a whole-number percentage.

Solution: No. Only 366 birthdays exist, so with 367 people two must share one: 100%. This is called the pigeonhole principle.

Quick questions

What is the birthday paradox?

It is the surprising result that only 23 people are needed for a better-than-even chance that two of them share a birthday. It is called a paradox because it feels wrong, not because it is a contradiction.

If 23 people are enough, why do I need about 253 people to match my own birthday?

That is a different question. To match your birthday, each other person gives one chance against your date. You need about 253 other people for a 50% chance of a match with you. The 23-person answer checks every pair in the room, and 23 people make 253 pairs, so the pairs grow much faster than the people.

Does the calculation assume birthdays are equally likely?

Yes. In real life some dates are a little more common, which makes shared birthdays slightly more likely, so the main result still holds.

Written by the EuclidCurve Smart Team. We are the maths and physics tutors behind EuclidCurve. We teach IB, AMC, ESAT and TMUA students in the UK, USA, UAE, Singapore and Hong Kong, and we write about the maths hiding in everyday life.

Keep exploring

Book a free class · Try today's IMO problem