LearndleNo. 2Sunday 29 November 2026

Twenty-three strangers

How many people does it take before two of them probably share a birthday?

About 7 minutesMaths

1 The question

Half the squads had a match

Each square is one squad at the 2014 World Cup in Brazil, 23 players each. Dark squares: at least two players in the squad were born on the same day of the year. The order is shuffled.

In June 2014, as the World Cup began, the BBC programme More or Less went through the birth dates of all 32 squads. Every squad had 23 players. In 16 of the 32 squads, at least two players shared a birthday.

A year has 365 days, and a squad has only 23 players. Half the squads with a match sounds like a strange run of luck. Is it?

In about 7 minutes you will be able to

  • Explain why shared birthdays turn up in surprisingly small groups.
  • Tell apart "any two people match" and "someone matches me".
  • Estimate when random codes or numbers start to repeat.

2 Your guess

How many people does it take?

Picture a room of strangers. People keep walking in. At some point it becomes more likely than not that two of them share a birthday: the same day and month, not the same year.

How many people need to be in the room for that?

184 people

Pick a number in your head before you read on.

Lock in a guess to go on.

3 Try it

Fill a room, then a thousand

Every person gets a random birthday. One room shows you who matched. A thousand rooms show you how often it happens. Each run of a thousand rooms adds a point to the chart.

23
One room
JFMAMJJASOND 23 people Two share 26 Dec

23 people make 253 pairs. Each pair has a 1 in 365 chance of sharing a birthday.

A thousand rooms

In this sample of 1,000 rooms of 23 people, 524 had a shared birthday. The exact chance is 50.7 per cent.

Your runs: the share of rooms with a match
0%50%100% 220406080 people in the room Run 1,000 rooms to add a point

any two share someone shares yours

In rooms of 23, how often did someone share YOUR birthday?

  1. In about half of the rooms, the same as any two.
  2. In about 6 rooms out of every 100.
  3. Almost never.
Show the answer

In about 6 rooms out of every 100.

In a room of 23 you can be paired with only 22 others. The exact chance that one of them has your birthday is 5.9 per cent. The other 231 pairs in the room do not involve you, and they are where most matches happen.

Try these

  • Run 1,000 rooms of 23 people.not done yet
  • Run 1,000 rooms at two other sizes too.not done yet
  • Switch to "Someone shares my birthday" and run 1,000 rooms of 23.not done yet

Do the three things in the list, then answer the question, to go on.

4 Why

It is about pairs, not about you

Most people picture themselves in the room and ask: will someone have my birthday? That question needs a crowd: you and 253 others. The real question counts every pair in the room, and a room has far more pairs than people.

Any two people: 23 people make 253 pairs. Every line is a pair that could share a birthday.
Someone shares yours: only the 22 pairs with you in them count.

Pairs grow faster than people

When a 23rd person walks into a room of 22, they bring 22 new pairs with them. 10 people make 45 pairs, 23 make 253, and 40 make 780. Double the room and the pairs roughly quadruple.

So why is the answer not 253 in 365?

Each pair matches with a chance of 1 in 365, and 253 pairs times 1 in 365 is about 0.69. That is not the chance itself, because the pairs overlap: if Anna matches Ben and Ben matches Carl, Anna matches Carl too. The exact sum goes person by person. The second person must miss the first (364 days out of 365), the third must miss both (363 out of 365), and so on. Multiply all 22 of these together and you get 0.493. That is a 49.3 per cent chance that nobody matches, so 50.7 per cent that somebody does.

0%50%100% 1100200300 people in the room 23: any two you + 253
The exact chances. Wine: any two people share a birthday. Gold: someone shares your birthday.

If you guessed fewer than 20

You guessed {guess}. That is too few, but you saw that the answer is small, which most people do not. With 15 people the chance of a match is only about 25 per cent.

If you guessed 20 to 26

You guessed {guess}. That is close. The answer is 23: the first group size where a match is more likely than not.

If you guessed 27 to 100

You guessed {guess}. Higher than the answer, like most guesses. By 50 people a shared birthday is already 97 per cent likely.

If you guessed more than 100

You guessed {guess}. Many people start from half of 365, about 183. That instinct belongs to the other question: how many people you need to meet before one shares your own birthday. For the room as a whole, 23 is enough.

Real birthdays are not spread evenly

Some months and some days of the week have more births than others. That makes a match slightly more likely than in this model, never less. The effect is small, and the answer stays at 23.

5 Use it

Three new situations

Use what you found out. A wrong answer explains itself, and you can try again. Only your first try counts for your result.

A web shop gives each order a random four digit code, from 0000 to 9999. Roughly how many orders until two orders probably share a code?

  1. About 120.
  2. About 1,200.
  3. About 5,000, half of the codes.
Show the answer

About 120.

With 10,000 possible codes, the pairs do the work again. 120 orders make 7,140 pairs, and the chance of a repeat passes one half at 119 orders. That is why shops and computers use much longer codes than you would think they need.

On a planet where a year has 1,460 days, four times as many as ours, how many people would a room need for an even chance of a shared birthday?

  1. About 23, the same as on Earth.
  2. About 46, twice as many.
  3. About 92, four times as many.
Show the answer

About 46, twice as many.

Four times as many days means the room needs about four times as many pairs. Doubling the people roughly quadruples the pairs, so twice as many people is enough: the exact answer is 46.

You are one of 100 guests at a wedding. Which is more likely?

  1. That two of the guests share a birthday.
  2. That a guest shares your birthday.
  3. Both are about equally likely.
Show the answer

That two of the guests share a birthday.

With 100 people there are 4,950 pairs. A shared birthday somewhere in the room is all but certain: 99.99997 per cent.

Find the right answer to all three questions to finish.

6 Done

What you found out

In a room of 23 people a shared birthday is more likely than not, because what counts is the number of pairs. 23 people make 253 pairs, and pairs grow much faster than people.

The same sum tells engineers how soon random codes start to repeat: after a little more than the square root of the number of possible codes, not after half of them.

Your result

    The text says how you did, not what the answer is.

    A day counts for the streak when you finish that day’s discovery on that day, by your own clock. Finishing an older one from the archive marks it done, but it does not add to the streak.

    Sources, and what the models leave out

    The pages below could not be opened directly while this edition was made, so each fact was checked through search results that quote them, in at least two places. Every chance on this page is worked out here with the exact sum, and the numbers match the ones in the sources: 50.7 per cent for 23 people, 253 others for your own birthday. The model is the textbook one: 365 equally likely birthdays, no 29 February and no twins. Real births are a little uneven through the year, which makes a match slightly more likely, not less. The order of the squares in the first picture is shuffled: it does not show which squads they were.