Intermediate

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.

%

Find the group size that achieves at least this probability of a shared birthday
365 for a standard year; use 366 for a leap year, or any value for custom scenarios
Minimum group size needed
23

Actual probability at this size: 50.73%

Target probability
50%
Achieved probability
50.73%
Possible days (d)
365
Group size for 50% chance
23
P(shared) with 23 people (d=365)
50.73%
P(shared birthday) vs group size 1 to 38 [%]
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
P(shared | n, d) = 1 − ∏ᵢ₌₀ⁿ⁻¹ (d − i) / d → find minimum n where P ≥ target
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

birthday paradox group size calculator
how many people for shared birthday
birthday paradox 23 people probability
shared birthday probability calculator
birthday problem inverse calculator
coincidence probability birthday
birthday paradox explained calculator

APA

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

Chicago

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.

IEEE

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

BibTeX

@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?