HomeProbability & StatisticsThe Birthday Paradox

🎂 The Birthday Paradox

Watch people fill day-of-year buckets one by one until two share a birthday, while a live probability curve explains why collisions arrive far sooner than intuition suggests.

Probability & Statistics3DModerate60 FPS
birthday-paradox-and-hash-collision-probability-lab ↗ Open standalone

People arrive one by one and are assigned a random bucket on a ring — a day of the year, or a hash digest slot. Watch how quickly two arrivals land in the same bucket, and see the live probability curve explain why.

🔬 What It Demonstrates

Collision probability grows with the number of pairs, not the number of people, so it rises far faster than intuition suggests — the same combinatorics that lets birthday-style attacks break undersized cryptographic hashes.

🎮 How to Use

Pick a preset (birthdays or a hash bit-width) or drag the bucket-count slider directly. Watch pillars fill and flash red on collision, then track the running average trial length against the √(πN/2) theoretical estimate.

💡 Did You Know?

With only 23 people in a room there's already a 50% chance two share a birthday — and the same math means a 128-bit hash only offers about 64 bits of real collision resistance.

⚙ Under the hood

Watch people fill day-of-year buckets one by one until two share a birthday, while a live probability curve explains why collisions arrive far sooner than intuition suggests.

birthday paradoxprobabilitystatisticssimulationinteractivemathThree.js

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)