Birthday paradox calculator and simulator
How many people does it take for a shared birthday to become more likely than not? Try 23 — then change the group size.
Theoretical result
Formula and worked example
Compare every pair
In a group of 23 people, there are 23 × 22 ÷ 2 = 253 different pairs. That is far more than 22 comparisons with just your own birthday. A match anywhere in the group is therefore much more likely than someone matching one specific person.
Start with no shared birthdays
The first birthday can be any day. The next must avoid one occupied day (364/365); the next must avoid two (363/365). Continue multiplying, then subtract the product from one. For 23 people, the probability of at least one shared birthday is about 50.7%.
Same group, different question
If you are one of 23 people, the chance that at least one of the other 22 shares your birthday is 1 − (364/365)²², about 5.9%. It is not 50.7%: “any pair” and “a match with me” are different events. Repeated simulations illustrate the first event, not a prediction of a real room.
Assumptions and limits
We assume 365 equally likely days and independent birthdays. Leap days, seasonality, twins and other real-world patterns are excluded. With 366 people a match is certain under this 365-day model. The colored numbers in a simulation identify repeated day numbers, not real dates or people.
This is a learning exercise, not a validated assessment.
References: Wolfram MathWorld · Birthday Problem