Buffon's Needle

Drop many needles on a floor ruled with parallel lines. The share that touch a line lets you estimate pi.

0 of 0 needles touch a line. Pi estimate: —

Thick solid = touches a line; thin dashed = misses

π4.42

Estimate over time (dashed: pi)

When the needle is no longer than the gap between lines, the chance that it touches a line is 2 × length ÷ (pi × gap). If the length equals the gap, that is 2/pi (about 0.6366). Divide the number of drops by the number of hits and double it, and you get an estimate of pi. A note: this page picks needle angles using pi, so it is a demonstration rather than a way to find pi from scratch.

How to play

Press "Drop" for one needle or "Auto" to keep dropping. Needles that touch a line are drawn thick and solid; the others are thin. The chart shows the pi estimate so far.

Learn more

When the needle is no longer than the gap between lines, the chance that it touches a line is 2 × length ÷ (pi × gap). If the length equals the gap, that is 2/pi (about 0.6366). Divide the number of drops by the number of hits and double it, and you get an estimate of pi. A note: this page picks needle angles using pi, so it is a demonstration rather than a way to find pi from scratch.

Read more about it: Thinking with chance and data →