Throwing darts at pi
Here is a way to work out pi that needs no geometry at all. Draw a circle inside a square. Throw darts at the square, completely at random. Count how many land inside the circle.
The circle covers pi quarters of the square, so four times the share that land inside should be pi. Every dart below is thrown by your browser, right now, with a random number generator.
Scroll ↓
Ten darts
Ten darts give a terrible answer. Possibly 2.8, possibly 3.6. Ten random things are mostly luck.
A hundred
Better, still wobbly. Notice that no single dart is clever. Each one is a coin flip with a slightly odd coin.
A thousand
Now it settles near 3.1, give or take a few hundredths. The luck has started to cancel itself out.
A hundred thousand
Close to pi, usually within a hundredth. But look at the price. To get one more correct digit you need about a hundred times as many darts, because the error shrinks with the square root of the number of throws.
That is a terrible way to compute pi, which mathematicians have to trillions of digits by other means. It is a wonderful way to answer questions that have no formula.
Will this order ship on time?
A customer is promised delivery in 5 days. The order has to be entered, pass a credit check, be picked and packed, wait for the carrier and travel. Each step usually takes about the same time, and occasionally takes much longer.
Above are five simulated orders, each step drawn at random from its own range. Same process, five different stories.
The answer from the average
Add up the usual time for each step and you get . Comfortably inside five days. Promise made with confidence.
This is the sum most planning is done with, and it is the trap. Delays do not cancel out the way darts do: a step can run two days late but it cannot run two days early.
Ten thousand orders
Same darts, different target. Simulate ten thousand orders and stack up when each one arrives. Green arrived inside the promise. Red did not.
The share in green is the honest answer to “will this order ship on time?”, and no average could have told you.
Now change one thing
Suppose the credit check went automatic for existing customers, so it never sits in someone’s queue. Same ten thousand orders, rerun.
That is what simulation buys a business: you can try a change on ten thousand imaginary orders before you inconvenience one real customer.
Your turn
Move the promise, switch steps off, or calm a step down, then run ten thousand orders.
| Step | Quickest | Usual | Worst |
|---|
Method. Each dart is a pair of random numbers from your browser’s generator. Each order step is drawn from a triangular distribution: a quickest, a usual and a worst time, with the usual time most likely. The steps and their ranges are illustrative, not measured from any business. Every percentage on this page is computed live from the simulated orders, so it can move by a point or so between runs, which is itself the lesson about sampling. Highland Willow, 2026-10-29.
More pieces like this
- Where an Order Spends Its Time: one order, quote to invoice, at one pixel per minute.
- All 100 County Seats: The Route Problem, Solved Live: a route through North Carolina's 100 county seats, untangled as you scroll.
- If a CPU Cycle Took One Second: computer waiting times rescaled until one processor cycle lasts a second.
- Your Spreadsheet as a City: one bad formula in a quoting workbook, and how far the damage travels.
- Seven Years to a Fraser Fir: one acre of Christmas trees and the cash it holds before anything sells.
- Murphy to Manteo, to Scale: North Carolina at one mile to 40 pixels, elevation, counties and economy.