Quant Memo
Foundational

Sphere Packing and Wasted Space

A classic interview brainteaser family about how much empty space is left over when you pack round objects into a container — and why the answer surprises most people the first time.

A common interview question: how much of a box is wasted space if you fill it with spheres instead of cubes? Most candidates guess something small, like 10-20%, because spheres "look like" they fill a container pretty well. The real answer for the best possible packing (spheres stacked so each one nestles into the dimples of the layer below) is that spheres occupy only about 74% of the volume — a fixed number, proven mathematically, that doesn't improve no matter how cleverly you arrange them.

The intuition: every sphere touching its neighbors still leaves curved gaps between them that no amount of clever arranging removes, unlike cubes, which tile space with zero waste. Looser packings — spheres dropped in randomly rather than stacked carefully — do much worse, filling only around 64% of the space.

The best possible packing of equal spheres fills about 74% of a container's volume (the Kepler conjecture, proved in 1998); random, uncareful packing settles near 64%. Interviewers use this to test whether a candidate reasons from the geometry of the gaps rather than eyeballing a number.

Worked example. A cubic crate is 1 meter on each side (1 m³) and is filled with the densest possible packing of identical balls. Total volume of balls: 1×0.74=0.741 \times 0.74 = 0.74 m³. If instead the balls were poured in randomly rather than arranged, expect closer to 1×0.64=0.641 \times 0.64 = 0.64 m³ of actual ball volume — a full 10 percentage points of "wasted" space lost purely to sloppy arrangement.

Related concepts

Practice in interviews

Further reading

  • Zeckendorf & Havil, various sphere-packing problem sets
ShareTwitterLinkedIn