Birthday Paradox Simulator

Birthday paradox calculator: the exact probability of a shared birthday in a group of n, with a repeated simulation that converges on the exact value.

At a glance

Computes
Exact probability that two people in a group share a birthday, plus simulated runs.
You supply
Group size, number of possible days, trials per run, and a seed.
Use when
You need the exact collision probability, or a demonstration that intuition fails.
Assumes
Birthdays uniform over the chosen number of days, and independent between people.

Default assumes equally likely birthdays and ignores leap day.

Exact probability

Ready

At least one shared birthday.

Simulated probability
Not run
Pairs compared
253
Trials completed
Not run

The pair count grows as n(n - 1) / 2.

Run the simulation to fill Monte Carlo metrics and convergence.

Probability against Trial; reference at Exact probability

0204060801000.00.20.40.60.81.0Exact probabilitySimulated shared-birthday p…
Chart label shortened to “Simulated shared-birthday p…”. Full series label: “Simulated shared-birthday probability”.
Convergence checkpoints
TrialMatching trialsSimulated probability

Exact probability against People

204060801000.00.20.40.60.81.0Entered group size 23Exact shared-birthday proba…
Chart label shortened to “Exact shared-birthday proba…”. Full series label: “Exact shared-birthday probability”.
Export

P(match) = 1 - product((days - i) / days), i = 0..people - 1 How?

How this is calculated

The exact calculation multiplies the probability that each new person has a birthday not already seen, then takes the complement. The simulation assigns random day numbers and records whether any birthday repeats.

Formula: P(match) = 1 - product((days - i) / days), i = 0..people - 1

Sources

  1. Wolfram MathWorld Birthday Problem. Wolfram MathWorld. Retrieved .

Method last reviewed