Birthday Paradox

probability visualizer
Side project · 2026

See why 23 people is enough to share a birthday, the theory and a live simulation, side by side.

Birthday Paradox screenshot
Demo · running the simulator until the empirical estimate meets the curve

The birthday paradox is the standard example of a true thing that feels wrong: in a room of just 23 people, it's more likely than not that two of them share a birthday. Most people hear the answer, nod, and still don't believe it, because the explanation is a formula, and a formula doesn't move. I wanted something you could push on instead of read.

So this puts the math and the experiment in the same view. On one side is the exact probability curve; on the other is a Monte Carlo simulator that actually deals out random birthdays, trial after trial, and tallies how often a collision shows up. Watch the empirical number climb toward the theoretical one and the result stops being a claim you take on faith and starts being something you just saw happen.

How it works

Stack

Vite · React 18 · TypeScript (strict) · Tailwind · Recharts. Dark and light themes with system auto-detect and a manual override; ships as a static bundle to GitHub Pages, so it runs entirely in the browser with no backend.

← all projects