Calculate the surprising probability that two or more people in a group share a birthday — with tables, visual bars, and customizable year length.
The birthday paradox calculator reveals the surprisingly high probability that two or more people in a group share the same birthday. With just 23 people, the probability exceeds 50% — a result that seems impossible until you do the math.
The "paradox" isn't a true logical contradiction — it's a clash between intuition and mathematics. People instinctively compare themselves to each person (22 comparisons for 23 people), but the correct analysis counts all pairs: C(23, 2) = 253 distinct pairs, each with a 1/365 chance of matching.
This calculator extends beyond the classic problem. You can customize the number of days in a year (useful for hash collision analysis), find the group size needed for any target probability, compute probabilities for triples or larger matching groups, and explore how the curve changes with different parameters. A complete table shows the probability growth as group size increases. Check the example with realistic values before reporting.
The birthday paradox is a cornerstone of probability education and has profound implications for cryptography, database design, and quality assurance. Understanding why shared birthdays are so likely helps develop better intuition about randomness and combinatorics.
This calculator goes beyond the textbook example, letting you explore custom parameters, triple matches, and the practical implications for hash functions and collision resistance.
P(no match) = ∏(i=1 to n−1) (d − i)/d, where d = days in year and n = people. P(match) = 1 − P(no match). People needed for 50%: n ≈ 1.2 × √d.
Result: P ≈ 50.73%
With 23 people and 365 possible birthdays, the probability that at least two share the same birthday is about 50.73%. There are C(23,2) = 253 pairs to check, and each has a 1/365 chance of matching.
The key insight is counting pairs, not individuals. For n people, there are n(n−1)/2 pairs. The probability that all birthdays are distinct is the product (365/365)(364/365)(363/365)...(365−n+1)/365). This product decreases faster than intuition suggests because each factor is slightly less than 1, and the compound effect accumulates rapidly.
The birthday attack reduces the security of hash functions. A naive analysis suggests 2^n operations to find a collision in an n-bit hash, but the birthday paradox shows only about 2^(n/2) are needed. This is why MD5 (128-bit) fell to collision attacks — 2^64 operations became feasible. Modern standards use 256+ bit hashes (SHA-256) where 2^128 operations remain infeasible.
While pairs dominate in small groups, the probability of triples, quadruples, or larger matching groups follows more complex combinatorics. The Poisson approximation works well: the expected number of k-tuples sharing a birthday follows a Poisson distribution with λ related to C(n,k)/d^(k−1).
It's a veridical paradox — the result is true but seems false. Our intuition fails because we think about matching one specific birthday instead of all possible pairs.
With 23 people there are C(23,2) = 253 pairs. The probability no pair matches is (364/365) × (363/365) × ... × (343/365) ≈ 0.4927, so P(match) ≈ 50.73%.
Yes. Real birthday distributions are slightly non-uniform (more births in September in the US), which actually increases the matching probability slightly.
The birthday paradox tells us a hash function with d possible outputs will produce collisions after about √d inputs. For a 128-bit hash, you'd need about 2^64 hashes — this is why 128-bit is considered weak.
The paradox is about any match. The probability that someone matches YOUR birthday is much lower: 1 − (364/365)^(n−1), which requires 253 people for 50%.
Yes! Any "collision" problem with d possible values and n items follows the same math. Use the custom "days in year" field to set d.