Birthday-paradox simulator

Draw a random group, spot shared dates and compare repeated experiments with the mathematical probability.

Two different birthday questions

In a group of 23 people with independent, equally likely birthdays across 365 days, the chance that any two share a birthday is about 50.73%. There are 253 pairs to compare. The chance that someone in those 23 matches one separate fixed date is only about 6.12%. This second question uses day 1 as the fixed date; it does not choose a person from the group.

Try a classroom experiment

  1. Apply the example settings, then draw one group. Repeated days are marked with text as well as shading.
  2. Run another 1,000 groups. Compare observed match rates with the theoretical probabilities.
  3. Download the trial record. Change the seed and apply settings for a fresh, repeatable experiment.

Changing a setting clears the old experiment after you apply it. The same seed and settings reproduce the same sequence, regardless of whether trials are run one at a time or in batches. The displayed group is the most recent trial.

Method and limits

The probability that all birthdays differ is (1 − 0/d) × (1 − 1/d) × … × (1 − (n − 1)/d). Subtract it from 1 to find any shared birthday. When people outnumber days a shared day is guaranteed. The fixed-date probability is 1 − (1 − 1/d)n.

The University of Illinois birthday activity explains this classroom model. Here, “possible days” means equally likely labels, numbered from 1. A 366-day setting treats every label equally; it does not model the real rarity of leap-day births. Actual birthdays have seasonal patterns, and real groups can include twins and other dependencies. Simulated frequencies fluctuate; they do not replace the mathematical calculation.

Random groups use a seeded pseudorandom generator for teaching. Do not use it for security or prize drawings. No real names or birthdays are needed. Try the dice-pool probability calculator for a different probability model.