Back to Home

π Day Coin Flip

Nicholas Norman March 2026

π Coin Flip Approx.

See Matt Parker's π Day Video Here: Calculating pi from coin flips (without randomness)

This simulation does use randomness. But the idea is this:

Given a sequence of heads and tails, calculate the ratio that there are more heads than tails.

So for something like this: T H T H H, there are more heads than tails, so we stop and calculate: 3/5.

Then we reset the count and keep testing sequences. When the heads outgrow the tails, we reset.

We take all of the ratios / the number of times we reset, (and multiply by 4, see Matt Parker's video on how to prove this gets to π) and we get an approximation of π.