Birthday paradox (collision probability) calculator

Exact birthday paradox collision probability, target→n, and Monte Carlo simulation (fixed seed) — runs locally in your browser.

Compute the probability of at least one collision when drawing n samples from d equally likely values (days or 2^b hash space).

Runs locally in your browser (no server upload). Shareable URLs reproduce the same state.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

How to use (3 steps)

  1. Select Days (d=365/366) or Bits (d=2^b).
  2. Enter n (or switch to “Target → n”).
  3. Copy a shareable URL or run a simulation.

Inputs

Mode
What to compute
Example:
Presets:

Results

P(collision)
P(no collision)
Approx (Poisson)
Approx error (abs / rel)
/
Target → required n
Required n (exact)
Required n (approx)

Graph

P(collision) vs n (blue). Orange line marks your current n.

Tip: hover (or tap) the graph to see the probability at a specific n. The quick table below provides accessible values.

Quick table

nP(collision)p (0..1)
Simulation (Monte Carlo)

Estimated P(collision)
95% CI (Wilson)
|p̂ − p_exact|

Notes & formulas

Examples

Classic: d=365, n=23

P(collision) is about 0.5073 (≈ 50.7%).

Hash collisions: 32-bit

Use bits mode with b=32 (d=2^32). Target 0.5 gives n≈77,164.

How to use this calculator effectively

This guide helps you use Birthday paradox (collision probability) calculator in a repeatable way: define a baseline, change one variable at a time, and explain each output using explicit assumptions before sharing results.

How it works

The calculator applies deterministic formulas to your input values and only rounds at the final display layer. This makes it useful for comparative analysis: keep one scenario as a baseline, then vary assumptions and measure the delta in both absolute terms and percentage terms. If a change appears too large or too small, verify units, period conventions, and sign direction before interpreting the result.

When to use

Use this page when you need a fast planning estimate, a classroom check, or a reproducible scenario that teammates can review. It is most effective at the decision-prep stage, where you need to compare options quickly and decide which assumptions deserve deeper modeling or external validation.

Common mistakes to avoid

Interpretation and worked example

Start with a baseline case and save that output. Next, edit one assumption to reflect your realistic alternative, then compare both the direction and size of change. If the direction matches domain intuition and magnitude is plausible, your setup is likely coherent. If not, check hidden defaults, unit conversions, boundary conditions, and date logic before drawing conclusions.

See also

FAQ

What is the birthday paradox?

It is the collision probability when drawing n samples from d equally likely values. With d=365, n=23 already gives about 50%.

Why does it exceed 50% with only 23 people?

The number of possible pairs grows as C(n,2), so collisions become likely quickly.

What is the exact formula?

P(no collision) = (d)_n / d^n, and P(collision) = 1 − P(no collision).

How do you compute the required n for a target probability?

We search the smallest integer n such that P(collision) ≥ target.

How does this relate to hash collisions (32-bit / 64-bit)?

Use bits mode (d=2^b). For 32-bit, the 50% point is about n≈77,164.

What is the seed in the simulation?

A seed makes the simulation deterministic and reproducible.

Are real birthdays uniform?

Not perfectly. This tool uses the standard uniform model.

How to use Birthday paradox (collision probability) calculator effectively

What this calculator does

This page is for estimating outcomes by changing inputs in one controlled workflow. The model keeps your focus on variables, not output shape. Start with stable assumptions, then test sensitivity by changing one key input at a time to observe directional impact.

Input meaning and unit policy

Each input has an expected unit and a typical range. For reliable interpretation, check whether you are using the same unit system, period, and base assumptions across all runs. Unit mismatch is the most common source of unexpected drift in numeric results.

Use-case sequence

A practical sequence is: first run with defaults, then create a baseline log, then run one alternative scenario, and finally compare only the changed output metric. This sequence reduces cognitive load and prevents false pattern recognition in early experiments.

Common mistakes to avoid

Avoid changing too many variables at once, mixing incompatible data sources, and interpreting a one-time output without checking robustness. A single contradictory input can flip conclusions, so keep each experiment minimal and document assumptions as part of your note.

Interpretation guidance

Review both magnitude and direction. Direction tells you whether a strategy moves outcomes in the desired direction, while magnitude helps you judge practicality. If both agree, you can proceed; if not, rebuild the baseline and verify constraints before deciding.

Related calculators