Science for Kids
Mathematics

Why do two people in your class probably share a birthday?

August 5, 202610 min read

A round birthday cake with lit candles standing on top

Line up your class and count heads. Thirty children, and a calendar with three hundred and sixty-five days to scatter them across. It looks like nowhere near enough people to crowd a year, so two of you sharing a date ought to be a genuine coincidence. In a class of thirty it happens about seven times in ten. Where are the extra chances hiding?

They are hiding in the pairs. Counting children is the wrong count, because a birthday match needs two people and neither of them has to be you. Every possible twosome in the room is a separate chance, and thirty children generate far more twosomes than anybody would guess.

A class of thirty hides 435 pairs

Most people ask themselves the wrong question without noticing. Does anybody in here have my birthday? That is you against twenty-nine other children, and twenty-nine looks feeble beside 365 days.

But nobody asked about you. Ravi and Sam matching counts. Sam and Nadia matching counts. Every twosome counts, with or without you in it. A group picked without caring who comes first is called a combination, and a pair is the smallest one there is.

Count a few now, on one hand: your thumb pairs with each of your four fingers, which is four combinations already. Your first finger has three fingers left that it has not met yet. Then two, then one, adding up to ten pairs out of five fingers.

Thirty children behave the same way, and the total runs away from you fast. Each of the thirty pairs with the twenty-nine others, giving 870. That counts every pair twice over, once from each end, so halve it.

30 × 29 ÷ 2 = 435 pairs

Every pair counted from both ends, then halved. Try it on a calculator.

So the room holds 435 chances at a match rather than thirty. Turning 435 chances against 365 days into an actual number is the next job, and the obvious method collapses immediately.

The easy count is the one where nobody matches

Try counting the matches head-on and you walk into a swamp. Two children might share a day. Three might share one between them. There might be two separate duplicate dates. Those possibilities overlap, so adding them up means counting some classrooms twice and losing others altogether.

So count the opposite instead, because exactly one kind of classroom contains no match anywhere: everybody on a different day. That is a single clean arrangement to count, and every classroom that fails to look like it hides a match somewhere.

Mathematicians call the leftovers a complement — everything outside the outcome you named. Count one side, subtract it from the whole, and the other side arrives free.

So one number decides the whole question: the chance that thirty children all land on thirty different days. Counting that number takes a picture of the year.

Every child takes a day from the next one

Picture the year as a paper strip of 365 boxes, one box per day. Make each box 1 cm(⅜ in) wide and the strip stretches 3.65 m(12 ft), about two beds end to end. Every child marks the box holding their birthday.

The first child finds all 365 boxes empty. The second must land in one of the 364 still free, so 364 chances out of 365. The third has to dodge two occupied boxes, so 363 out of 365. Every marked box makes life harder for the next arrival.

Multiply that entire string of fractions and you have the chance of the whole room dodging one another. That chance is a probability, a number saying how likely something is, where 1 means certain and 0 means impossible. Whatever is missing from 1 is the chance of a match.

So the answer arrives by subtraction, out of a chain of shrinking fractions with one link per child. The question now is how many links that chain needs before the dodging fails.

Twenty-three people tip it past half

At ten children the dodging is still comfortable, and their chance of missing each other completely is about 88 in 100.

Two schoolchildren at neighboring desks turning to look at each other in surprise
Neither of them was checking. The match came out of a pair nobody had considered.

Keep adding children and the fractions bite. At twenty the no-match chance has slid to roughly 59 in 100. At twenty-three it lands on 49 in 100, which has just slipped underneath half.

So twenty-three people give a better-than-even chance that two of them match, 50.7 times in 100. They also make 253 pairs. Thirty people make 435 pairs, and the probability of a match climbs to about 71 in 100.

Soccer has run the tidiest test anybody could ask for. Every one of the thirty-two national squads at the 2014 World Cup carried exactly twenty-three players. Sixteen of those squads contained a shared birthday, half of them, against a prediction of 50.7 in 100.

Real birthdays are not spread evenly. In the United States more babies arrive in September than in any other month, and February 29 exists for anyone born in a leap year. Both effects push the same way, so genuine classrooms match slightly more often than a row of equal boxes predicts.

Twenty-three people fit around two dinner tables, and they hold 253 pairs. That number is doing all the work, and it also explains why the answer feels so wrong.

The 406 pairs you never check

Say all this out loud in a classroom and somebody will immediately check their own birthday against everybody else’s, find nothing, and announce that the arithmetic is broken.

Twenty-three people to match anybody. Two hundred and fifty-three to match you.

The same 253 turns up in both halves, and it is no coincidence. A group of twenty-three people contains 253 pairs, and 253 is how many other people you need before your own birthday becomes a coin toss. What the room manages with 435 pairs, you are attempting with twenty-nine.

The student who thought it was too obvious to write down

Harold Davenport was an undergraduate at the University of Manchester, nineteen years old and in his final year. The year was 1927, roughly when your great-great-grandparents were at school. He worked the answer out, told a friend, and did nothing whatever with it.

A young man in nineteen-twenties clothing thinking at a wooden desk in an old university hall
Manchester, 1927. The sum took an afternoon, and then it sat in a drawer.

His reason was not shyness. He could not believe that nobody had said it before. The arithmetic was ordinary and the surprise was obvious, so surely the puzzle already had a name. It did not. We only know Davenport ever had it because that friend, George Tyson, finally wrote it down in a letter in 1983, fifty-six years afterwards.

Meanwhile the problem reached print through a side door. Richard von Mises had fled Germany in 1933 and was teaching in Istanbul. His 1939 paper is the earliest publication anybody can point to. He had been chasing a different question, though: the expected number of matching pairs, meaning the average you would get from rerunning the same room over and over.

William Feller put the familiar version into a probability textbook in 1950. Students everywhere read it, and the puzzle finally acquired a name, the birthday problem.

The mathematics had taken an afternoon. Persuading anybody that a fact this ordinary was worth printing took twenty-three years.

Shrink the year to six days

A die has six faces, so a die is a year with six days in it. Roll four dice at once and you have a class of four inside that tiny year. Four dice make six pairs, and six pairs against six days is roughly the squeeze that 253 pairs make against 365.

Four white dice on a sunlit table
Four dice, six pairs, six faces. Two land together about seven rolls in ten.

The drop from fourteen to nine is this article in miniature. Removing one die halved the pairs, six down to three, and the matches disappeared with them.

A rule is hiding in those numbers: a match becomes an even bet once the pairs reach about seven for every ten days. Six days want just over four pairs, landing between three dice and four. And 365 days want 253 pairs, landing exactly on twenty-three people.

So the rule governing a die in your hand also governs a calendar. Only the number of boxes changed.

Why nobody sees it coming

Go back and look at the classroom. Nothing in that room resembles a container holding 435 of anything.

You can see thirty children. You cannot see a pair, because a pair is not an object sitting anywhere. It is two children plus your decision to put them side by side, and the room is thick with decisions nobody has made yet.

The reason it feels wrong is that everybody checks their own pairs and nobody else’s. You run through your twenty-nine and find nothing. So does the child beside you, running through a completely different twenty-nine. Between you, the class is quietly ignoring four hundred pairs.

So stop asking your neighbor. Ask the room. Get all thirty birthdays said out loud, one after another, and let all 435 pairs test themselves. About seven classes in ten, two hands go up on the same date.

Liked this? Take it with you.