What this calculator does
In a group of 23 people the chance that at least two share a birthday is 50.7%, which is famously higher than most people expect. By 50 people it is 97% and by 70 it is 99.9%.
The intuition fails because people picture comparisons against themselves rather than between everyone. Twenty-three people make 253 possible pairs, and it only takes one of those pairs to match. The question is not whether someone shares your birthday, which would need about 253 people to reach even odds, but whether any two of them share one.
The formula
The probability of no shared birthday is computed first, as the chance that each successive person avoids all the birthdays already taken: 365/365 times 364/365 times 363/365 and so on. The answer is one minus that product. The calculation assumes birthdays are uniformly distributed and independent, and ignores leap years and twins.
| Term | Meaning |
|---|---|
| Pairs | n(n−1)/2 possible pairings in a group of n. This grows quadratically, which drives the result. |
| Complement | Computing the chance of no match and subtracting, which is far easier than counting matches directly. |
| Collision | The general name for two items landing on the same value, of which a shared birthday is one instance. |
| Uniformity assumption | That all days are equally likely, which is not quite true in reality. |
The inputs explained
| Field | What to enter |
|---|---|
| Number of people | Number of people in the group. |
| Possible birthdays (days) | Number of possible birthdays. 365 for a normal year, or use a different value to explore collisions in other contexts. |
When to use it
Settling the classic argument
The result is genuinely counterintuitive and the calculation is the shortest way to demonstrate it.
Understanding hash collisions
The same mathematics governs how many items a hash function can handle before two collide, which is why the birthday attack is named after it.
Assessing duplicate risk
Any system assigning random identifiers faces the same collision probability, and it arrives far sooner than intuition suggests.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does the chance grow with group size?
The probability of at least one shared birthday at a range of group sizes.
| People in the group | Probability of a shared birthday | Probability of no shared birthday | Group size |
|---|---|---|---|
| 10 people | 11.7% | 88.3% | 10 |
| 23 people | 50.7% | 49.3% | 23 |
| 30 people | 70.6% | 29.4% | 30 |
| 50 people | 97.0% | 2.96% | 50 |
| 70 people | 99.9% | 0.084% | 70 |
Questions
Why is 23 people enough for even odds?
Because 23 people form 253 distinct pairs, and any one of those pairs matching is a success. The chance each individual pair does not match is 364/365, and 253 such chances multiplied together fall just below half.
How many people to share my birthday specifically?
About 253 for even odds, which is a completely different question. Comparing everyone against one fixed date is a linear problem; comparing everyone against everyone else is quadratic. Confusing the two is the reason the result feels wrong.
Does this account for leap years?
No, it assumes the number of days you enter with all equally likely. Adding 29 February changes the answer only marginally. Real birthdays are also not uniformly distributed, with seasonal patterns in most countries, and that slightly increases the chance of a match.
What is a birthday attack?
A cryptographic attack that exploits this mathematics to find two inputs producing the same hash. Because collisions appear around the square root of the number of possible outputs rather than the number itself, a hash function needs roughly twice the bits you might expect for a given security level.
For a related counterintuitive result, see the Monty Hall calculator. For general probability work, see the probability calculator.