Birthday Paradox Calculator — Group Size for a Shared Birthday
Enter a target probability to instantly find the minimum group size at which at least two people are likely to share a birthday — and discover why the answer is far smaller than most people expect.
%
Actual probability at this size: 50.73%
How does this calculator work?
The birthday paradox: solve 1 − ∏(d−i)/d ≥ P for minimum group size n. With d = 365 days, reaching 50% needs just 23 people; 99% needs 57. This calculator takes a target probability and finds n iteratively using log-space arithmetic to avoid underflow.
Formula
How this is calculated
The birthday paradox asks: in a room of how many people is there at least a 50% chance that two share a birthday? The answer — just 23 — surprises almost everyone because people instinctively compare themselves to one specific other person, rather than counting all pairs. With 23 people there are 253 unique pairs (23 × 22 ÷ 2), and the probability that none of those pairs match is less than one half.
This calculator solves the inverse problem: given a desired probability level and the number of possible days, it finds the smallest group size n for which P(shared) ≥ target. Internally it iterates n from 2 upward, computing log P(all distinct) = Σᵢ₌₀ⁿ⁻¹ ln((d−i)/d) and setting P(shared) = 1 − exp(log P(all distinct)). Using logarithms avoids floating-point underflow that would occur when multiplying many small fractions directly. The loop stops at the first n that meets the target.
Assumptions: birthdays are independent and uniformly distributed over d days. In reality, birth rates peak slightly in summer months, making coincidences marginally more common than this model predicts. Both n and d are positive integers; if n exceeds d, the pigeonhole principle guarantees a collision (P = 1). The probability curve in the output shows how steeply P rises as the group grows — it crosses 99% at just 57 people and 99.9% at 70 people for d = 365.
Frequently asked questions
The probability is driven by pairs, not individuals. With n people there are n×(n−1)÷2 unique pairs. With 23 people that is 253 pairs. The probability that all 253 pairs have different birthdays is less than 0.5 — so the chance of at least one match exceeds 50%. The pair count grows quadratically with n, which is why the probability rises far faster than most people expect.
With 365 possible days, the pigeonhole principle guarantees at least one shared birthday when the group reaches 366 people. In practice, you reach 99% probability at just 57 people and 99.999% at 83 people. The pigeonhole guarantee of 366 is largely academic — near-certainty arrives with far fewer people.
Yes — change d to model any uniform-coincidence problem. Set d = 52 to ask about shared birth weeks, d = 12 for shared birth months, or d = 1000 to ask how many random integers (1–1000) must be drawn before a repeat is expected. The formula and the paradox apply to any situation with d equally likely outcomes.
Also known as
TG we-Calculate Editorial Team. (2026). Birthday Paradox Calculator — Group Size for a Shared Birthday [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/birthday-paradox-calculator
TG we-Calculate Editorial Team. "Birthday Paradox Calculator — Group Size for a Shared Birthday." TG we-Calculate. 2026. https://we-calculate.com/calculator/birthday-paradox-calculator.
TG we-Calculate Editorial Team, "Birthday Paradox Calculator — Group Size for a Shared Birthday," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/birthday-paradox-calculator
@misc{wecalculate_birthday_paradox_calculator, title = {Birthday Paradox Calculator — Group Size for a Shared Birthday}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/birthday-paradox-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
