Abakcus

← All articles

Probability · Paradox · Coincidence

The Birthday Paradox

Why 23 people are enough

Put 23 strangers in a room and it is more likely than not that two of them share a birthday. Fill the room yourself and watch it happen.

One year · 365 days · 23 birthdaysTwo landed on the same day
JanFebMarAprMayJunJulAugSepOctNovDec2
10 people
11.7%
23 people
50.7%
30 people
70.6%
50 people
97.0%
57 people
99.0%

The claim

Two people, one day

How many people do you need to gather before it becomes more likely than not that two of them were born on the same day of the year? Take a moment and commit to a number.

There are 365 days to choose from, so most people reason that you need about half of them: 180 or so. Some, sensing a trick, go lower and say 100. The answer is 23. With 23 people the chance of a shared birthday is 50.7%. With 30 it is over 70%. With 50 it is 97%. In a group of 57, a shared birthday is as close to certain as anything in daily life ever gets: 99 chances in 100.

Nothing here is disputed and nothing is a trick. It is a straightforward calculation that any school pupil can follow, and it has been checked against real rooms of real people thousands of times. It is called a paradox only because the true answer and the answer we expect are so far apart. Before any explanation, see it.

Experiment I. Fill the room

One dot per guest, one square per day
JanFebMarAprMayJunJulAugSepOctNovDec

50.7%chance of a shared birthday among 23 people (253 pairs)

2 people80 people

Drag the slider or press the button to invite 23 guests with random birthdays.

Press “New room” a dozen times at 23 and you will see a gold square in about half of them. Slide up to 40 and the gold squares are nearly always there, often more than one. The calendar looks almost empty, eleven twelfths of it blank, and the guests still keep landing on each other.

The illusion

You are counting people. Count pairs.

The mistake almost everyone makes is to put themselves at the centre of the room. We hear “shared birthday” and silently translate it into “someone shares my birthday”. That is a different question, and its answer really is large.

The real question does not care whose birthday it is. Any two people will do: the woman by the window and the man at the door, neither of whom is you. And the number of possible twosomes in a room grows much faster than the number of people in it. Two people make one pair. Five make ten. Ten make forty-five. Twenty-three make 253.

5 people

10

pairs

10 people

45

pairs

16 people

120

pairs

23 people

253

pairs

Each of those lines is a separate chance for a coincidence. One line has a 1 in 365 chance of joining two people with the same birthday, which is poor odds. But 253 lines at 1 in 365 each is no longer poor odds at all. It is like buying 253 lottery tickets for a draw in which one ticket in 365 wins.

The chart below sets the two questions side by side. The blue curve is the birthday paradox: any two people. The gold curve is the question people think they were asked: someone matching you.

Experiment II. Two questions that sound alike

Drag to change the size of the room
0%50%100%0255075100

Any two of 23 people share a birthday

50.7%

One of 23 people shares yours

6.1%

The blue question counts every pair in the room. The gold question counts only the pairs that include you. To push the gold curve past 50% you need 253 other people.

At 23 people the blue curve has crossed one half and the gold curve has barely left the floor, at about 6%. To give yourself an even chance of meeting your own birthday twin you would need 253 other guests. That number is no accident: it takes roughly 253 separate chances at 1 in 365 to reach a half, and a room of 23 strangers supplies exactly 253 chances, as pairs, without anybody noticing.

The calculation

Easier backwards: nobody matches

Counting the ways that at least two people can match is messy. One pair, two pairs, a triple, a pair and a triple. The trick is to turn the question around and ask for the chance that everyone is different.

Let the guests walk in one at a time. The first can have any birthday. The second must avoid one day, so has 364 safe days out of 365. The third must avoid two days: 363 out of 365. The fourth, 362. Keep going to the twenty-third guest, who must avoid twenty-two days already taken and has 343 safe ones. For nobody to match, every one of these must happen, so the probabilities multiply.

The calculation for 23 people

Twenty-three fractions, one answer
P(no match)=365365×364365×363365× … ×343365≈0.4927
P(at least one match)=1 − 0.4927=0.5073

Twenty-two fractions, each only a little less than one, and their product has already fallen below a half. That is the whole proof. For larger groups there is a handy shortcut: the chance of no match among n people is very nearly e raised to the power −n²/730, which shows at a glance why the answer depends on the square of the group’s size.

The calculation assumes 365 equally likely days and ignores 29 February. Real births are not spread perfectly evenly; some weeks of the year are noticeably busier in maternity wards than others. This does not rescue our intuition. Any unevenness makes matches more likely, because crowded days are easier to collide on. Twenty-three is, if anything, a slight overestimate.

The history

From Istanbul to the Tonight Show

Portrait photograph of the mathematician Richard von Mises in a suit and tie, looking to the side
Richard von Mises. Smithsonian Institution, no known copyright restrictions.

The problem is usually credited to Richard von Mises, an Austrian mathematician and aeronautical engineer who helped put probability theory on firm foundations. In 1939 he published a paper on how objects distribute themselves among boxes, with birthdays as the example.

The paper appeared in the journal of the science faculty of Istanbul University, where von Mises had been a professor since 1933, one of the many scholars who rebuilt their careers in Turkey after being driven out of Germany. So the most famous puzzle in probability first saw print on the Bosphorus. The mathematician Harold Davenport is said to have known the result about a decade earlier and not thought it worth publishing.

It reached the public in 1947, when the physicist George Gamow told it as a story in One Two Three . . . Infinity. He worked the odds out on the page, in a book that taught a generation of readers that numbers could be astonishing.

Johnny Carson laughing, in a 1970 NBC publicity photograph
Johnny Carson, 1970. NBC Television, public domain.

The best-loved failed demonstration belongs to Johnny Carson. As the story is usually told, he heard about the paradox on The Tonight Show and decided to test it on the studio audience. He asked one person for a birthday, then asked whether anyone else in the audience had been born on that day. Nobody had, and the theory appeared to have failed on live television.

Carson had made exactly the mistake described in Part 2. He tested the gold curve, a match with one named birthday, when the claim was about the blue one, any match at all. With a few hundred people in the seats he was nearly certain to have dozens of shared birthdays in the room. He simply never asked the question that would have found them.

The evidence

Thirty-two squads, eighteen matches

A football World Cup is a statistician’s gift. Every squad has exactly 23 players, the magic number, and every player’s date of birth is printed in the programme. If the theory is right, about half the squads should contain two players who share a birthday.

At the 2014 World Cup in Brazil there were 32 squads. The theory predicts that about 16 of them should contain a shared birthday. Journalists at the BBC went through the lists published on 10 June and counted exactly sixteen. We repeated the count with the final registered squads, player by player, and found eighteen: a little above the prediction, and well within what chance allows. Here is every one of them.

2014 FIFA World Cup, every squad

32 squads · 23 players each

18 of 32 squads had a shared birthday

Expected
16.2
Found
18
Two pairs
5
Group A
  • Brazil25 JulHulk & Paulinho
  • Cameroon23 MarChoupo-Moting & Enoh
  • Croatia25 FebBadelj & Eduardo
  • Mexicono match
Group B
  • Australia8 AprRyan & Vidošić
  • Chileno match
  • Netherlands22 JulJanmaat & Kuyt
  • Spain8 JanKoke & David Silva
Group C
  • Colombia13 JanYepes & Arias
  • Greeceno match
  • Ivory Coastno match
  • Japanno match
Group D
  • Costa Ricano match
  • Englandno match
  • Italyno match
  • Uruguayno match
Group E
  • Ecuadorno match
  • France13 FebSakho & Mangala8 MarCabella & Mavuba
  • Honduras29 JulChávez & Palacios
  • Switzerland16 JanLichtsteiner & Ziegler12 AprStocker & Džemaili
Group F
  • Argentina22 FebRomero & Enzo Pérez10 AprGago & A. Fernández
  • Bosnia and Herzegovina20 JunBegović & Kolašinac
  • Iran1 FebHaghighi & Beitashour6 SepSadeghi & Montazeri
  • Nigeria12 DecMoses & Azeez
Group G
  • Germanyno match
  • Ghanano match
  • Portugalno match
  • United States28 JanBrooks & Wondolowski
Group H
  • Algeria15 MayLacen & Medjani
  • Belgiumno match
  • Russia14 JulIgnashevich & Kanunnikov
  • South Korea27 FebKim Young-gwon & Koo Ja-cheol8 JulKwak Tae-hwi & Son Heung-min

Final squads as registered for the tournament. Expected value: 32 squads × 50.7% = 16.2. Gold rows have at least one pair of team-mates born on the same day and month.

One squad, up close

Counting squads is convincing. Looking inside one is better. Take Argentina, who arrived at the 2026 World Cup as defending champions. For that tournament, squads grew from 23 players to 26, which lifts the predicted chance of a shared birthday from 50.7% to 59.8%. Twenty-six players make 325 pairs. Here is every member of Argentina’s squad, placed on the calendar by shirt number and then listed in the order their birthdays fall through the year.

Case study · 2026 FIFA World Cup

Argentina’s twenty-six

Players
26
Pairs
325
Predicted
59.8%
Result
Match
Jan42469Feb19MarApr15·26111613May1212725Jun105Jul8Aug223Sep2318Oct14NovDec211720

One player, by shirt number Shared birthday One day apart

BirthdayNo.PlayerPositionBornClub
1 January4Gonzalo MontielDefender1997River Plate
17 January24Enzo FernándezMidfielder2001Chelsea
18 January6Lisandro MartínezDefender1998Manchester United
31 January9Julián ÁlvarezForward2000Atlético Madrid
12 February19Nicolás OtamendiDefender1988Benfica
6 April15Nicolás Gonzálezsame dayMidfielder1998Atlético Madrid
6 April26Nahuel Molinasame dayDefender1998Atlético Madrid
9 April11Giovani Lo CelsoMidfielder1996Real Betis
26 April16Thiago AlmadaForward2001Atlético Madrid
27 April13Cristian RomeroDefender1998Tottenham Hotspur
6 May1Juan MussoGoalkeeper1994Atlético Madrid
10 May2Marcos SenesiDefender1997Bournemouth
20 May12Gerónimo RulliGoalkeeper1992Marseille
24 May7Rodrigo De PaulMidfielder1994Inter Miami
28 May25Facundo MedinaDefender1999Marseille
24 June10Lionel MessiForward1987Inter Miami
29 June5Leandro ParedesMidfielder1994Boca Juniors
23 July8Valentín BarcoMidfielder2004Strasbourg
22 August22Lautaro MartínezForward1997Inter Milan
31 August3Nicolás TagliaficoDefender1992Lyon
2 September23Emiliano MartínezGoalkeeper1992Aston Villa
8 September18Nico PazForward2004Como
5 October14Exequiel PalaciosMidfielder1998Bayer Leverkusen
6 December21José Manuel LópezForward2000Palmeiras
18 December17Giuliano SimeoneForward2002Atlético Madrid
24 December20Alexis Mac AllisterMidfielder1998Liverpool

Sorted by day of the year, so that neighbours in the table are neighbours on the calendar. Squad as registered for the 2026 World Cup; clubs as listed at the time.

There it is, in the first week of April. Nicolás González, number 15, and Nahuel Molina, number 26, were both born on 6 April. As it happens they were born on the same day of the same year, 6 April 1998, which the paradox does not even ask for. Two team-mates who share a dressing room turn out to share a birthday as well. Argentina seem to make a habit of it: their 2014 squad, in the chart above, had two such pairs.

The near misses are just as instructive. Enzo Fernández and Lisandro Martínez were born on 17 and 18 January. Thiago Almada and Cristian Romero, on 26 and 27 April. Look at how the dots bunch: five birthdays in April and five in May, and not one in March or November. A random scatter is not an even scatter. Chance makes clumps, and clumps are where collisions happen. Nobody chose these players for their birthdays, and the calendar filled up exactly the way the arithmetic said it would.

You can run the same check on any list of people with known birthdays. Among the presidents of the United States, James Polk and Warren Harding were both born on 2 November, which is unremarkable for a group of that size: the chance of at least one match among 45 people is about 94%. A typical school class of 30 has a shared birthday seven times out of ten, which is why this is one of the few theorems a teacher can prove by taking attendance.

The variations

Change the question, change the number

Once you see that the paradox is about pairs and not about birthdays, you can turn the dials. Make the coincidence easier and the group shrinks. Make it harder and the group grows, but never as much as you expect.

Same month
5

people to share a birth month

With twelve months instead of 365 days, five people already make a shared month more likely than not (61.8%).

A day apart
14

people for birthdays a day apart

Ask only for two birthdays within one day of each other and fourteen people are enough for an even chance.

A triple
88

people for three on one day

Three people with the same birthday is much rarer. It takes a group of 88 before that becomes more likely than not.

Your own day
253

people to match yours

For an even chance that somebody shares your own birthday, you need 253 other people in the room.

The statisticians Persi Diaconis and Frederick Mosteller, who worked several of these out, drew a general moral from them. With a large enough number of opportunities, they wrote, any outrageous thing is likely to happen. A coincidence feels meaningful because we notice the one that occurred and never count the thousands that could have occurred and did not.

This is the family that the Monty Hall problem belongs to: puzzles in which the arithmetic is easy and the difficulty lies entirely in asking the right question. If you have not played it yet, Abakcus has a full stage with three doors waiting, and the story of the woman who got it right while ten thousand readers told her she was wrong.

The consequences

Why your passwords depend on it

The birthday paradox would be a pleasant party trick if it stopped at parties. It does not. The same square-root law governs every system that hands out labels at random and hopes that no two will be the same.

The most important example is the hash function, the tool that turns a file or a password into a short digital fingerprint. Security depends on its being practically impossible to find two different inputs with the same fingerprint. If a fingerprint has N possible values, you might suppose an attacker has to try about N inputs. But the attacker is not trying to match one particular fingerprint. Any two that collide will do, and that is the birthday question. It takes only about the square root of N attempts.

Experiment III. A bigger calendar

How many before a clash is likely?

23people for a better-than-even chance that two collide, out of 365 days in a year

The rule of thumb: with N equally likely values, a repeat becomes more likely than not after about 1.18 × √N draws. The number you need grows with the square root of the calendar, not with the calendar.

This is why cryptographers speak of a birthday attack, and why a hash must be twice as long as you would naively think. A 64-bit fingerprint sounds enormous, with eighteen quintillion possible values, yet a collision becomes likely after about five billion tries, well within reach of ordinary hardware. The danger is not theoretical. In February 2017 researchers at Google and CWI Amsterdam published two different PDF files with the same SHA-1 fingerprint. SHA-1 produces 160-bit fingerprints, so the birthday bound alone would have demanded about 2⁸⁰ attempts; mathematical shortcuts brought the work down to roughly nine quintillion computations, and the old standard was finished. It is the reason modern hash functions are 256 bits long or more.

The same law surfaces elsewhere. Forensic scientists have had to explain to courts why two unrelated people in a large DNA database can match at many markers: a database of tens of thousands of profiles contains hundreds of millions of pairs. Engineers who issue random order numbers or session codes learn that duplicates appear long before the supply runs low. And in September 2009 the Bulgarian national lottery drew the same six numbers in two consecutive draws, an event that set off an official inquiry and that, given how many lotteries are drawn around the world each week, was bound to happen somewhere sooner or later. Like a needle dropped on a floor that knows the value of π, chance turns out to be far more orderly than it looks.

That may be the most interesting thing about the whole subject. Nobody in a room of 23 arranges to share a birthday. Each birth is its own event, with its own story. And yet a law holds over all of them, exact enough to predict, to within two, how many of thirty-two squads would have one. Even what we call chance keeps to rules it did not write.

The shelf

Four books on coincidence

On luck, on chance and on why the improbable keeps happening. For more, see the Abakcus list of the best probability and statistics books.

Cover of The Improbability Principle by David J. Hand

Start here

The Improbability Principle

David J. Hand · Farrar, Straus and Giroux

Why coincidences, lottery repeats and rare events happen every day, explained by a former president of the Royal Statistical Society. The birthday paradox is the first step; this book is the staircase.

See it on Amazon

As an Amazon Associate, Abakcus earns from qualifying purchases. Links above are affiliate links.

Questions

The birthday paradox, briefly

What is the birthday paradox?

The birthday paradox is the surprising fact that in a group of only 23 people there is a better than even chance, about 50.7%, that at least two of them share a birthday. It is not a logical paradox. It is called one because the true answer is so much smaller than most people guess.

How many people do you need for a 50% chance of a shared birthday?

Twenty-three. With 22 people the chance is 47.6% and with 23 it is 50.7%. The probability climbs quickly after that: about 70.6% with 30 people, 97% with 50, and more than 99% with 57. Certainty needs 366 people, or 367 if you count 29 February.

Why is the number so small?

Because what matters is the number of pairs, not the number of people. Twenty-three people form 253 different pairs, and every pair is a separate chance of a match. Most people instead imagine comparing everyone to one fixed birthday, their own, which is a different and much harder question.

How do you calculate the birthday paradox?

Work out the chance that nobody matches and subtract it from 1. The second person avoids the first with probability 364/365, the third avoids both with 363/365, and so on. Multiply these for 23 people and you get about 0.493, so the chance of at least one shared birthday is 1 − 0.493 = 0.507.

How many people are needed for someone to share my birthday?

Far more. The chance that at least one of n other people was born on your particular day is 1 − (364/365)ⁿ. That passes 50% only at n = 253. With 23 other people it is only about 6%, which is why the birthday paradox feels wrong: people answer this question when they are asked the other one.

Where is the birthday paradox used in real life?

Its best known use is in computer security. A birthday attack looks for any two inputs that produce the same hash value, which takes only about the square root of the number of possible values. The same mathematics explains chance matches in DNA databases, duplicate random ID codes, and coincidences that seem far too unlikely to be accidents.

Sources

  • Richard von Mises, “Über Aufteilungs- und Besetzungswahrscheinlichkeiten”, Revue de la Faculté des Sciences de l’Université d’Istanbul 4 (1939), 145–163.
  • George Gamow, One Two Three . . . Infinity (Viking, 1947).
  • Persi Diaconis and Frederick Mosteller, “Methods for Studying Coincidences”, Journal of the American Statistical Association 84 (1989), 853–861.
  • James Fletcher, “The birthday paradox at the World Cup”, BBC News Magazine, June 2014.
  • 2014 World Cup squads and dates of birth: “2014 FIFA World Cup squads”, Wikipedia (checked 27 November 2026); shared birthdays counted by Abakcus.
  • Argentina’s 2026 World Cup squad and dates of birth: FIFA squad lists, as compiled in “2026 FIFA World Cup squads”, Wikipedia (checked 27 November 2026).
  • W. W. Rouse Ball and H. S. M. Coxeter, Mathematical Recreations and Essays, for the attribution to Davenport.
  • Portraits from Wikimedia Commons, credited beside each image.

Beyond Euclid

Liked this? Get one like it every week.

One email a week, handpicked by Ali. 240 issues so far, free.