Skip to content
Generate now

The Birthday Paradox Explained With a Simple Experiment

How many people need to be in a room before two of them probably share a birthday? Most people guess somewhere around 180, half of 365. The real answer is just 23. This famous result, known as the birthday paradox, is not really a paradox at all. It is a lesson in how quickly pairs add up. Here is the math in plain language, plus an experiment you can run in a few minutes.

Options

Tip: press Enter or Space to generate again.

Ready

Why the answer is so small

The trick is that you are not looking for someone who shares your birthday. Any two people in the room count. With 23 people there are 253 different pairs (23 ร— 22 รท 2), and each pair is another chance for a match.

Our intuition counts people, but the problem grows with pairs. Double the group and the number of pairs roughly quadruples, which is why the probability rises so fast.

The math in three steps

It is easier to calculate the chance that nobody shares a birthday and subtract it from 1. Ignoring leap days and assuming every date is equally likely:

  1. The first person can have any birthday: 365/365.
  2. The second must avoid one date: 364/365. The third must avoid two: 363/365, and so on.
  3. Multiply those fractions for everyone in the group, then subtract the result from 1.

The results are striking:

  • 10 people โ€” about 11.7%
  • 20 people โ€” about 41.1%
  • 23 people โ€” about 50.7%
  • 30 people โ€” about 70.6%
  • 50 people โ€” about 97.0%
  • 70 people โ€” about 99.9%

Run the experiment with random birthdays

You can watch the paradox happen with the Random Birthday Generator above:

  1. Leave the age range at the default 18 to 65 or set any range from 0 to 110 โ€” the year does not matter for this test.
  2. Pick the Month D, YYYY format so month and day are easy to read.
  3. Set the number of birthdays to 23 and press Generate.
  4. Export the list as CSV, sort it by month and day, and look for any two dates that match while ignoring the year.
  5. Repeat about 20 times and count how many groups had a shared birthday.

Over many rounds, roughly half of your groups should contain a match. Try 50 birthdays per round and nearly every group will.

Turn it into a classroom activity

The birthday paradox is a favorite in math lessons because students can test it themselves:

  • Predict first: ask everyone to guess how many people are needed for a 50% chance and write the guesses down.
  • Check the class: a class of 25 or 30 has a good chance of a real shared birthday. If not, that is a lesson in probability, too.
  • Simulate: each group generates random birthdays and reports whether they found a match, then the class combines the results.
  • Graph it: plot group size against the share of rounds with a match and compare it to the table above.

For a simpler warm-up on chance, coin flips work well:

Where the idea shows up in real life

The same math explains why collisions happen sooner than expected in computing. When a system assigns random identifiers or short hash values, two items can end up with the same value long before the space of possible values is anywhere near full. Security researchers even call one family of techniques a โ€œbirthday attack.โ€ This is why developers choose long identifiers, such as 128-bit UUIDs, when uniqueness really matters.

Common misunderstandings

  • โ€œIt means someone shares my birthday.โ€ No โ€” the chance that one of 22 others shares your specific birthday is only about 6%. The 50% figure is for any pair at all.
  • โ€œA match proves the dates are not random.โ€ The opposite: matches are exactly what randomness predicts in a group of this size.
  • โ€œNo match means the math is wrong.โ€ At 23 people the odds are close to a coin flip, so about half of all groups will have no shared birthday.
  • โ€œLeap years break it.โ€ Including 29 February changes the numbers only very slightly.

Pro tips

  • Compare only month and day โ€” ignore the year when checking for matches.
  • Run many rounds; a single group of 23 tells you very little on its own.
  • Use the ISO YYYY-MM-DD format if you plan to sort dates in a spreadsheet.
  • Ask students to predict the answer before revealing the math for maximum surprise.

Frequently asked questions

Why is it called a paradox if it is true?

It is a veridical paradox: the result is correct but feels wrong because our intuition counts people instead of pairs of people.

Does it matter that real birthdays are not evenly spread?

Real birthdays cluster slightly in some months, and that unevenness actually makes a match a little more likely, not less.

How many people guarantee a shared birthday?

Only 367 people guarantee it, counting 29 February, because there are 366 possible birthdays. Below that, a match is likely but never certain.

Try a generator

Random Address Generator

Realistic street addresses with valid-format postal codes and phone numbers for 40 countries.

Fake Identity Generator

Complete fictional person profiles: name, birthday, address, phone, email, job and more.

Need random data? Get it now.

Pick any of 144 generators, hit Generate and copy or export the results as CSV, JSON or TXT. No account, no limits, nothing stored.

Start generating โ€” free