Skip to content
100% local

Birthday paradox

Calculate the probability that two people in a group share the same birthday.

Input
Output

Birthday paradox

The birthday paradox is the surprising fact that in a room of just 23 people, there's better than even odds that two of them share a birthday — even though there are 365 possible days. This tool computes that probability for any group size you give it, so you can check the math yourself or settle an argument with real numbers.

Paste one or more group sizes into the input, one per line by default, and switch the separator to commas or spaces if that suits your data better. Each line of the result shows the group size and the probability that at least two people in it share a birthday. The formula option compares the exact calculation — built from multiplying the chance each new person avoids every birthday already taken — against the widely quoted approximation formula, which is faster by hand but drifts slightly for larger groups. Turn on "Show intermediate steps" to see the multiplication chain or the exponential approximation behind each result, useful for teaching the concept or checking a homework answer.

The calculation assumes a fixed 365-day year with birthdays spread evenly across it, the standard simplification used to teach this problem — leap years and real-world birth-date unevenness don't change the conclusion meaningfully. Group sizes must be whole numbers; enable "Ignore invalid values" to skip anything else in the list rather than stopping at the first bad entry. The live tally reports how many groups were processed, the average probability across them, and how many values were skipped.

Everything runs locally in your browser — no group sizes are ever sent anywhere. Copy the result, download it as a .txt file, or send it straight into another tool to keep working.

FAQ

Why is the probability so high for just 23 people?
It's counting pairs, not individuals. A group of 23 people contains 253 possible pairs, and each pair has a small but real chance of sharing a birthday — added up across all of them, the odds cross 50%.
What's the difference between the exact and approximate formulas?
The exact formula multiplies the probability that each new person avoids every birthday already taken by earlier people. The approximate formula uses 1 − e^(−n(n−1)/730), which is close for typical group sizes but increasingly overestimates the probability as the group grows.
What happens once the group is larger than 365 people?
A shared birthday becomes certain — with the exact formula, the calculator shows exactly 100%, by the pigeonhole principle: there are more people than days for them to spread across.
Does this account for leap years or uneven birth-date distributions?
No. It uses the standard textbook assumption of a fixed 365-day year with birthdays spread evenly across it. Real-world unevenness in birth rates actually makes shared birthdays slightly more likely, not less.
Are the group sizes I enter uploaded anywhere?
No. The calculation runs entirely in your browser — nothing you type is sent to a server.