How this calculator works
It is simpler to calculate the chance that every birthday differs, then subtract it from one. The second person must avoid one occupied date, the third must avoid two, and so on. The inverse mode checks increasing group sizes and returns the first meeting the target. Real birthdays are seasonal and leap days are uncommon, so the equal-date model is an approximation. A target of 100% requires one more person than there are dates.
Formula
P(all distinct) = product from i = 0 to n - 1 of (1 - i/d), for n <= d; otherwise 0. P(match) = 1 - P(all distinct). Expected matching pairs = n(n - 1)/(2d).
Worked example
With 23 people and 365 equally likely dates, the probability of a match is about 50.73%. With three people and four possible dates, all-distinct probability is 4 × 3 × 2 / 4³ = 3/8, so a match has probability 5/8.
Advertisement
Frequently asked questions
Is this the chance someone shares my birthday?
No. It considers every pair in the group. Matching one particular person is a different event with fewer opportunities.
Can I use the tool for hash collisions?
Yes, when independent outcomes are uniform over a finite set. Treat dates as the possible hash outputs and people as the number of samples.
Can the expected number of pairs exceed one?
Yes. It is a count average. It is different from the probability of at least one pair, which never exceeds 100%.