๐ŸŽ‚ Birthday Paradox Simulator

50.7%

Probability at least two people share a birthday

Enter a group size to calculate the probability that at least two people in that group share the same birthday (month and day). A hands-on way to explore the famously counter-intuitive "birthday paradox."

How to use

  1. Use the slider to set the group size.
  2. Adjust the number of days in a year if needed (normally 365).
  3. The probability that at least two people share a birthday is calculated automatically.

How the calculation works

This calculates the chance that, in a group, at least two people share a birthday. Try different group sizes (2 to 100) and year lengths. Chance that all birthdays differ = 365/365 ร— 364/365 ร— 363/365 ร— โ€ฆ (one term per person) Chance of at least one shared birthday = 1 โˆ’ chance that all differ With just 23 people the chance passes 50%. It counts any two people sharing a birthday, not someone sharing yours, and 23 people already form 23 ร— 22 รท 2 = 253 pairs.

Worked example

10 people: 11.7% 23 people: 50.7% 30 people: 70.6% 41 people: 90.3% 50 people: 97.0% 57 people: 99.0% 70 people: 99.916% In a class of 30, there is about a 70% chance that two pupils share a birthday.

Things to be aware of

  • Real birthdays are slightly uneven across the year, so shared birthdays are a little more likely than calculated.
  • The chance only reaches 100% once there are more people than days (366 people). Even 100 people is 99.99997%.
  • The same idea underlies the โ€œbirthday attackโ€ in cryptography, a way of finding hash collisions.

FAQ

What is the "birthday paradox"?

The counter-intuitive mathematical fact that in a group of just 23 people, there's already more than a 50% chance that two of them share a birthday. It's called a paradox because most people intuitively expect it would take far more people, given there are 365 possible days.

What formula does this use?

It calculates the probability that everyone has a *different* birthday, then subtracts that from 1 to get the probability that at least two share one. The "all different" probability is computed by multiplying 365/365 ร— 364/365 ร— 363/365 ร— ... once for each person.

Does this account for leap years (February 29 birthdays)?

No, for simplicity it assumes a fixed year length (365 by default). You can change the "days in a year" field to model other cases, such as including leap days or considering only birth months (12).