Pi Rain Monte Carlo π

Estimate 4·in/N
—0 correct digits vs π
Inside
0
Points N
0
|error| vs π
—
Rate
paused

Convergence (estimate over N)

0 points drawn

Why does this work?

Rain random points uniformly over a square and ask how many land in the circle inscribed in it. If the square has side 2, its area is 4 and the circle's radius is 1, so the circle's area is π·1² = π. The fraction of points landing inside the circle approaches the area ratio circle/square = π/4. Rearranged, π ≈ 4 × inside / total. Error shrinks like 1/√N, so every extra digit costs about 100× the points — the dashed line in the chart is π and the shaded band is one standard error.

Keep Pi Rain handy