Zero Signup ToolsFree browser tools

Calculator Tools

Birthday Paradox Calculator

Calculate the probability that two people in a group share a birthday. Handles any group size, leap years, and any bucket count for hash and dice collisions.

Inputs

Whole number from 1 to 10,000.

Default 365. Use 366 for a leap year or any bucket count (dice faces, hash space, anything with D equally likely outcomes).

Quick examples

Each example loads its people count and bucket size into the inputs above.

How the math works

P(no match) is the product (1 - 1/D)(1 - 2/D)...(1 - (n-1)/D) and P(match) is 1 minus that. We compute the log of each factor and sum, so the answer stays accurate even when n is large and the no-match probability is microscopic.

How to use

  1. Enter the number of people in the group. The famous example is 23 people in a 365-day year.
  2. Set the days in year. Use 365 for a standard year, 366 for a leap year, or any bucket count for dice, hashes, or UUIDs.
  3. Read the match probability at the top of the result panel, with the complement (all-different probability) below it.
  4. Check the group-size table to find the smallest group needed to hit 25%, 50%, 75%, 95%, 99%, or 99.9% probability.
  5. Tap a Quick example to load a preset (classroom of 30, 23 people, leap year office, d20 rolls, 16-bit hash collisions).
  6. Click Copy full result to grab a text summary with the probability, the complement, and the threshold table.

About this tool

Birthday Paradox Calculator computes the probability that at least two people in a group of n share the same birthday, for any group size and any bucket count. The default 365-day year reproduces the classic textbook result, where the probability passes 50% at just 23 people and climbs to 99% by 57 people, which feels counterintuitive because we tend to anchor on 365 and expect the answer to grow linearly with n. The math under the hood is the product form P(no match) = (1 - 1/D)(1 - 2/D)...(1 - (n-1)/D), computed in log space and summed before a single final exponentiation, which keeps the answer accurate even when n is in the thousands and the no-match probability is microscopic. The result panel reports the match probability as a percentage, a plain decimal ready to paste into a spreadsheet or notebook, and an odds form (about 1 in X) so the same number reads naturally in writeups and presentations. A group-size table shows the smallest n that crosses each common probability threshold (25%, 50%, 75%, 95%, 99%, 99.9%), so you can answer the related question, how many people do I need for a coin-flip chance of a shared birthday, without rerunning the calculator. A distribution panel previews the probability at nearby group sizes and at standard reference values (5, 10, 23, 30, 50, 100), with the active n highlighted, so the curve's shape is obvious at a glance. Because the model only assumes D equally likely buckets and independent draws, it generalises far beyond birthdays: set D to 6 for dice, 20 for a d20, 65,536 for a 16-bit hash, or any large number for hash and UUID collision estimates. Useful for statistics homework, probability lectures, party trivia, planning whether a classroom or office is likely to share a birthday, sizing how many random samples it takes before duplicates appear, and gut-checking back-of-the-envelope hash and UUID collision risks. The tool also reports the complement (P(all different)) and, when the match probability is essentially 1, expresses the gap as 1 - 10^x so you can still see meaningful digits. Everything runs in your browser. The numbers you enter never leave your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsCalculator Tools