Packing Circles and Squares
How to estimate what fraction of a square's area can be covered by non-overlapping circles, and why the 'obvious' grid arrangement isn't the best one — a good instinct for the estimation puzzles interviewers love.
"Roughly how many golf balls fit in this room" is a famous estimation-interview question, and its clean mathematical cousin is: "if you pack same-size circles into a square as densely as possible, what fraction of the square's area do the circles cover?" You can't answer this by computing an exact formula from scratch in an interview — you build it up from a simple grid arrangement and a known correction.
Start with the simplest arrangement: a grid
Line circles up in rows and columns, each circle touching its neighbors. If each circle has radius , it sits inside its own square tile, so one circle's area relative to its tile is
In plain English: a circle covers about 78.5% of the smallest square that contains it, and since the whole big square is tiled by many identical small squares each with that same ratio, the whole packing covers about 78.5% of the total area too — regardless of how many circles you use, as long as edge effects are small.
The better arrangement: hexagonal packing
Grid packing isn't actually the densest way to pack circles — shifting alternate rows sideways so each circle nestles into the gap between two circles in the row below (a honeycomb pattern) packs more circles into the same area. The density of this hexagonal packing is
In plain English: about 90.7% of the area is covered — noticeably better than the grid's 78.5%, because the gaps between grid rows are wasted space that the offset rows now overlap. This is provably the best possible density for packing equal circles in an infinite plane (a hard theorem), so 90.7% is the ceiling to compare any practical packing against.
Worked example: estimating balls in a box
A box measures , filled with balls of radius 3cm (diameter 6cm). Volume of the box: . Volume of one ball: . Using the analogous 3D grid-packing density of as a rough floor and the known best 3D sphere-packing density of as a ceiling, the number of balls is roughly , i.e. somewhere between about 995 and 1,414 balls — an estimation range you can produce in under a minute, which is exactly what these interview questions are testing.
What this means in practice
The habit these puzzles build — anchor to a simple, computable arrangement (grid), then adjust using a known correction factor (hexagonal density) — is precisely the estimation-under-uncertainty skill interviewers are probing for, and it transfers directly to Fermi-style sizing questions about market volumes, inventory capacity, or how many trades fit in a time window, where an exact answer isn't available but a defensible bracket is.
Grid packing of equal circles covers of a square's area; the denser hexagonal (honeycomb) packing covers , the provable maximum. Use the grid number as a fast lower-bound estimate and the hexagonal number as an upper bound.
Related concepts
Practice in interviews
Further reading
- Conway, Sloane, Sphere Packings, Lattices and Groups, ch. 1