Skip to content

Birthday Paradox Calculator

Calculate shared-birthday probability for any group size and number of equally likely possible birthdays. See the no-match probability, number of pair comparisons, expected matching pairs, and the smallest groups reaching 50%, 90%, and 99%.

The classic model uses 365 independent, equally likely birthdays and excludes leap day.

Limits: 100,000 people and outcomes.

Enter a group size and possible birthdays.

Use 23 people and 365 birthdays for the classic birthday paradox.

How to Use the Birthday Paradox Calculator

Enter the number of people in the group.

Enter the number of equally likely possible birthdays. Use 365 for the classic birthday problem or 366 when deliberately modelling leap day as an equally likely outcome.

The result shows the probability of at least one shared birthday, the probability that every birthday is different, the number of possible pairs, and common probability thresholds.

Why 23 People Is Enough for a 50% Chance

The birthday paradox feels surprising because people often compare everyone only with themselves.

The actual problem compares every possible pair in the group.

A group of 23 people contains 23 × 22 ÷ 2, or 253, distinct pairs.

Under the classic 365-day model, those comparisons produce a 50.7297% probability that at least one pair shares a birthday.

Classic 365-day birthday probabilities

Classic 365-day birthday probabilities
PeoplePossible pairsChance of at least one match
104511.6948%
2019041.1438%
2325350.7297%
3043570.6316%
4078089.1232%
4182090.3152%
501,22597.0374%
571,59699.0122%
702,41599.916%

Swipe horizontally to view the full table.

How the Exact Probability Is Calculated

It is easier to calculate the probability that every birthday is different and then subtract that value from one.

The first person can have any birthday. The second must avoid one occupied day, the third must avoid two occupied days, and the process continues through the group.

For n people and d equally likely possible birthdays, the no-match probability is the product of (d − i) ÷ d for i from zero through n − 1.

When the group contains more people than possible birthdays, a match is guaranteed by the pigeonhole principle.

Any Pair Versus Your Birthday

The classic problem asks whether any pair in the group shares a birthday.

That is very different from asking whether at least one other person shares one specific person's birthday.

With 365 equally likely birthdays, 23 total people give a 50.7297% chance that some pair matches.

A specific person needs 253 other people, or 254 people including that person, before the chance that someone matches that particular birthday exceeds 50%.

Pair Comparisons and Expected Matching Pairs

A group of n people contains n(n − 1)/2 distinct pairs.

Under a uniform d-outcome model, each pair has probability 1/d of matching.

The expected number of matching pairs is therefore n(n − 1)/(2d).

Expected matching pairs is not the same as the probability of at least one match. It can exceed one because a group can contain several matching pairs.

Probability Thresholds

For 365 equally likely birthdays, 23 people are required to exceed 50%, 41 people exceed 90%, and 57 people exceed 99%.

The live calculator recomputes these minimum group sizes when the number of possible outcomes changes.

Minimum group sizes for 365 possible birthdays

Minimum group sizes for 365 possible birthdays
Target probabilityMinimum peopleActual probability
50% or higher2350.7297%
90% or higher4190.3152%
99% or higher5799.0122%

Swipe horizontally to view the full table.

Using the Calculator for Other Collision Problems

The same mathematics applies whenever independent items are assigned uniformly to a fixed number of possible outcomes.

Examples include simplified hash collisions, randomly assigned identifiers, numbered bins, repeated random selections, and other occupancy problems.

The model is not valid when outcomes have different probabilities unless the underlying calculation is changed.

Classic Model Assumptions

The standard birthday problem assumes 365 equally likely birthdays, independent people, no leap day, and no special relationship among births.

These assumptions make the probability exactly calculable and useful for teaching collision behaviour.

Real populations have seasonal patterns, scheduled deliveries, twins, leap-day births, and other departures from the model.

Assumptions behind the classic birthday problem

Assumptions behind the classic birthday problem
AssumptionMeaningReal-world limitation
Equal probabilityEvery possible birthday or outcome has probability 1/dReal birth dates are not distributed perfectly evenly
IndependenceOne person's birthday does not affect another person's birthdayTwins, related births, and selected groups can violate this assumption
Fixed outcome countThe classic model normally uses 365 possible birthdaysLeap day and other calendar conventions require a different outcome count
Any matching pairA collision occurs when any two people share a birthdayThis is not the probability that someone matches one specific birthday

Swipe horizontally to view the full table.

Why the Result Is Called a Paradox

There is no logical contradiction.

It is called a paradox because the correct probability conflicts with many people's first intuition.

The intuition improves once the rapidly growing number of pair comparisons is made visible.

Numerical Precision

The calculator sums logarithms instead of directly multiplying many probabilities close to one.

It uses a stable exponential-complement calculation so very small collision probabilities are not unnecessarily rounded to zero during calculation.

Displayed probabilities use up to four decimal places, while calculations retain browser floating-point precision.

Privacy and Local Processing

The calculation runs entirely in the browser.

Group sizes, possible outcomes, and results are not uploaded, added to a public URL, or permanently stored.

Birthday Collision Probability Formulas

The calculator evaluates the exact uniform-outcome product rather than relying on the common square-root approximation.

Formula variables

Number of people or sampled items
Number of equally likely possible birthdays or outcomes
Target collision probability
Number of matching pairs
No shared birthday
At least one shared birthday
Number of pairs
Expected matching pairs
Approximate group size for probability p
Guaranteed collision

Examples

Classic 23-person group

1

Input

23 people and 365 possible birthdays

Show result

Result

50.7297% chance of at least one shared birthday, 49.2703% chance of no match, and 253 possible pairs.

Ten-person group

2

Input

10 people and 365 possible birthdays

Show result

Result

11.6948% chance of at least one shared birthday.

Ninety-percent threshold

3

Input

41 people and 365 possible birthdays

Show result

Result

90.3152% chance of at least one shared birthday.

Ninety-nine-percent threshold

4

Input

57 people and 365 possible birthdays

Show result

Result

99.0122% chance of at least one shared birthday.

Small custom outcome space

5

Input

5 people and 10 equally likely outcomes

Show result

Result

69.76% chance of at least one collision.

Guaranteed match

6

Input

366 people and 365 possible birthdays

Show result

Result

100% probability. At least two people must share an outcome.

Frequently Asked Questions

What is the birthday paradox?

It is the surprising result that only 23 people are needed for the probability of at least one shared birthday to exceed 50% under the classic 365-day model.

What is the probability with 23 people?

With 365 independent and equally likely birthdays, the probability is approximately 50.7297%.

Why are 23 people enough?

Because 23 people create 253 distinct pairs, and any one of those pairs can share a birthday.

Does this mean someone will share my birthday?

No. The classic question asks whether any pair matches. Matching one specified person's birthday is much less likely.

How many people are needed for a 90% chance?

With 365 equally likely birthdays, 41 people produce approximately a 90.3152% probability.

How many people are needed for a 99% chance?

With 365 equally likely birthdays, 57 people produce approximately a 99.0122% probability.

What happens when there are more people than possible birthdays?

A match is guaranteed by the pigeonhole principle.

Why does the calculator show expected matching pairs?

It shows how many matching pairs would occur on average across many equivalent groups. It is not the same as the probability of at least one match.

Can expected matching pairs be greater than one?

Yes. A single group can contain multiple matching pairs, so the expected count can exceed one.

Should I use 365 or 366 possible birthdays?

Use 365 for the classic problem. Use 366 only when deliberately modelling leap day as an equally likely outcome.

Are real birthdays equally distributed?

No. The classic calculation is an idealised uniform model. Real birth patterns vary across dates and groups.

Can this model hash collisions?

It can model a simplified uniform collision space. Real cryptographic analysis also depends on the hash design, output size, attacker model, and whether outputs behave ideally.

Are my values uploaded?

No. The calculation runs locally in the browser.