The Packing Problem

How much of space can spheres fill? Start flat, with circles on a page

How Much of a Page Can Circles Cover?

Scatter identical coins across a table and push them together until nothing more will fit. Some of the table is metal and some of it is bare wood, and the ratio between them is the density of the arrangement. The question is how large that ratio can be made. It sounds like the kind of thing you settle in an afternoon with graph paper. It is not: the answer in the plane is π/√12 ≈ 90.69%, and the first complete proof arrived in 1940.

Two things make the problem hard, and both survive into every higher dimension. The first is that "density" is not obviously well defined for an infinite arrangement — you have to measure through a finite window, and the answer depends on the window. The second is that ruling out every conceivable arrangement is a completely different task from finding a good one. A packing is a construction; a bound is a proof about all constructions at once. Circles on a page are the cleanest place to watch that distinction do its work.

Two Ways to Fill a Page

The obvious arrangement puts circles on a square grid, each touching four others. The better one shifts every second row sideways by one radius, so the circles drop into the hollows below and each one touches six. Both repeat a single tile forever, which is what makes them easy to evaluate: the density of a repeating pattern is settled entirely inside one fundamental cell. Count the circle area in the cell, divide by the cell’s area, and you are done — no infinite sum, no limit, just two numbers. The square cell measures 2r × 2r and contains four quarter-circles, so the ratio is πr²/4r² = π/4. The hexagonal cell is a rhombus with the same base sheared over, area 2√3 r², and it still holds exactly one circle’s worth. Same numerator, smaller denominator.

Square packing78.54%

cell 4r² · circle πr² → π/4

0 circles on screen

Hexagonal packing90.69%

cell 2√3 r² · circle πr² → π/√12

0 circles on screen

hexagonal beats square by 15.5%

A lattice packing repeats one tile forever, so its density is settled inside that single tile: circle area divided by cell area. The square cell is 2r × 2r and holds four quarter-circles, giving πr²/4r² = π/4. The hexagonal cell is a rhombus of the same base but sheared, with area 2√3 r², and it still holds exactly one circle’s worth — the same numerator over a smaller denominator. Drag the radius: r cancels out of both fractions, so the percentages never move.

Try it: Drag the radius slider from end to end. The circle count on screen changes more than thirty-fold; both densities do not move at all. Every r in the ratio cancels against another r, which is why the answer is a pure number and not a measurement — a packing of atoms and a packing of oranges obey the same arithmetic.

Try to Beat It

Knowing that the hexagonal arrangement reaches 90.69% is not the same as believing nothing else does better. The sandbox below removes the two things that usually get in the way. Every circle is the same size, so density is nothing but a headcount — how many fit — and the region has no edges at all: it is a torus, where a circle leaving the right side reappears on the left, and the faint ghosts show where its wrapped copy lands. Overlapping pairs glow red and stop counting. The box is sized so that thirty circles fit hexagonally and exactly fill it to π/√12, which means the thirty-first has nowhere to go.

Circles
19
Density
57.44%
Best valid
0.00%
Target
90.69%

No overlaps. Every circle you fit in raises the density.

The box has no walls: it is a torus, so a circle sliding off one edge reappears on the opposite one and the faint ghost copies show its wrapped image. That removes the boundary entirely, which means the fraction of the box covered is an honest density rather than an artefact of the frame. Every circle has the same radius, so the density is just the count × πr² over the box area — the whole game is how many you can fit. Thirty is the ceiling.

Try it: Add circles one at a time and shove them around by hand. Somewhere in the high twenties it gets genuinely difficult, and the arrangement you end up wrestling toward is the hexagonal one — rows of circles sitting in the hollows of the row below. Press Snap to hexagonal when you have had enough, then try to add one more.

What "Density" Has to Mean

An infinite packing covers infinite area inside an infinite plane, and ∞/∞ is not a number. The repair is to measure through a finite window and then let the window grow: density is the limit of covered area over window area as the window expands without bound. That definition sounds like bookkeeping until you watch a small window in action. Centred on a single circle, a tiny window reports 100%. Widen it to a couple of radii and the answer plunges to 86%, then overshoots past 91%, lurching up and down according to which circles the edge happens to slice. Those swings are entirely a story about the boundary, and the boundary is a ring of fixed thickness around a region growing like s² — so its share fades like 1/s, and the true value emerges only in the limit.

π/√12 = 90.69%85%90%95%100%0.250.512481624window half-width, in circle radii (log scale)
Covered fraction
91.08%
Whole circles
1
Cut by the edge
4
Boundary share
80%
error from π/√12: 0.39 pts

The packing never changes; only the window does. Sitting inside a single circle the answer is 100%, and a window a few radii across still swings by tens of percent as its edge slices through different circles. Those swings are boundary effects: the cut circles live in a ring of fixed thickness, so their share falls off like 1/s while the interior grows like s². That is why density is defined as a limit — the value as the window grows without bound, which no finite picture ever quite shows you.

Try it: Press Grow the window and watch the amber ring of edge-cut circles thin out relative to the violet interior. The curve thrashes below a half-dozen radii and is visually pinned to π/√12 by twenty. Notice that the limit is approached but never reached: no finite picture of a packing ever displays its own density exactly.

The Argument from a Single Circle

Here is the idea that turns a global optimisation into a local one. Give every circle the territory closer to its centre than to any other centre. The plane is carved into Voronoi cells, one per circle, with no gaps and no overlaps — so the density of the whole packing is an average of the little densities π/(cell area). Push that around and the problem inverts: to make the packing dense you must make the typical cell small. Every cell contains its own circle, so no cell can be smaller than the smallest region that holds a unit circle and still tiles the plane. That region is the regular hexagon, area 2√3 ≈ 3.4641, and π/2√3 is π/√12 again. The square arrangement wastes area because its cell has area 4 for the same single circle.

Cell area
3.4641
Wasted
0.3225
Local density
90.69%
Above the minimum
+0.0000

This is the regular hexagon: area 2√3 = 3.4641, local density π/√12 = 90.69%. Nothing beats it.

Give every circle the ground that is closer to it than to any other and the plane is carved into cells, one per circle, with no gaps and no overlaps. Density is then a local average: each cell contributes π over its own area. Four neighbours at distance 2 give a square of area 4 and π/4; six give a hexagon of area 2√3 and π/√12. Drag any neighbour, or perturb the whole ring — the cell area rises and never falls, because among all polygons that tile the plane and contain a unit circle, the regular hexagon is the smallest.

Try it: Drag the neighbouring circles anywhere you like, or haul the perturbation slider across. The cell area readout goes up and refuses to come back down: 3.4641 is a floor. Pull the neighbours far enough apart and the cell escapes to infinity altogether — a hole in the packing is a cell with no bound.

Turning that picture into a theorem took a long time, because a real packing need not be periodic and its cells need not all be the same. Gauss settled the restricted question in the nineteenth century: among lattice packings, nothing beats the hexagonal one. Axel Thue announced the general result in 1890, but his argument had a gap that was never satisfactorily closed; a complete proof, controlling the average cell area across arrangements with no repeating structure at all, came from László Fejes Tóth in 1940. Fifty years to remove the word "lattice" from a statement about coins on a table is a fair warning about what the same question costs in three dimensions and above.

See also: Kepler’s Orange Stack, where the same question is asked about spheres and the answer takes until 1998; and The Lattice Workshop, where cells like these are built by hand.

Key Takeaways

  • The answer is π/√12 ≈ 90.69% — Equal circles arranged hexagonally, each touching six others, cover a larger fraction of the plane than any other arrangement can
  • Density is scale-invariant — The radius cancels out of circle area over cell area, so the answer is a pure number: it applies to coins, atoms and planets alike
  • The square grid leaves 13% on the table — π/4 ≈ 78.54% against π/√12; shifting alternate rows by one radius so the circles fall into the hollows is the entire improvement
  • Density has to be defined as a limit — Covered area over window area, as the window grows without bound; on small windows boundary effects dominate and the ratio swings wildly
  • Voronoi cells localise the problem — Density is an average of π/(cell area), and the regular hexagon is the smallest plane-tiling cell that contains a unit circle — the argument Thue sketched in 1890 and Fejes Tóth completed in 1940