Vergleich dreier Kugelanordnungen im Querschnitt: lose Schüttung mit großen Lücken, einfaches Übereinanderstapeln in Reihen und die dichteste Packung, bei der die oberen Kugeln in den Mulden der unteren Schicht liegen; jeweils mit Angabe der Raumfüllung in Prozent.

Sphere packing density

The sphere packing density indicates what proportion of a space is filled by equally sized spheres when they are stacked as cleverly as possible. The best value in three-dimensional space is about 74 percent, with the rest remaining unavoidable gaps.

When you put oranges in a crate, there is always air left between them. The sphere packing density is the number that describes this effect. It tells you what fraction of the crate’s volume is actually filled by the oranges. In the cleverest arrangement of equally sized spheres, it comes to about 74 percent, roughly three quarters. A quarter remains empty space, no matter how carefully you stack. If you simply pour the spheres loosely into the crate, you end up with about 64 percent instead.

Why 74 percent is a hard limit

This number is not an estimate from experiments but a proven upper bound. Johannes Kepler already suspected in 1611 that there is no better arrangement than the one used by the fruit seller. A complete proof was only achieved in the late 1990s, and it required massive computer assistance. The mathematician Thomas Hales had to have thousands of individual cases calculated for it. The Kepler conjecture is now considered confirmed.

The proof is interesting for another reason as well. It was one of the first major mathematical theorems whose calculations experts could no longer verify by hand. Because of this, a program was later written that formally checks every step of the proof. Such verification programs have since become their own field of research and also play a role in testing AI systems.

A common misconception: the 74 percent applies only to spheres of equal size. If you mix small and large spheres, you can partially fill the gaps and achieve higher values. This is exactly what concrete production exploits with sand, gravel, and cement.

How to stack spheres optimally

The best arrangement starts with a flat layer. There, each sphere touches six neighbors, like hexagons on a tiled surface. The next layer is not placed directly on top but into the hollows of the first. This way, each sphere sits lower, and the packing becomes denser. Repeating this, every sphere in the interior touches exactly twelve others.

Surprisingly, there are several equally good solutions for this. From the third layer onward, you can choose between two positions without changing the density. This gives rise to infinitely many arrangements with exactly the same value. Two of them have their own names and appear in chemistry as crystal structures of metals such as copper or magnesium.

In other dimensions, the question is much harder. In the plane, circles are packed most densely in a hexagonal pattern, yielding about 91 percent. For four or five dimensions, the optimal packing remains unknown to this day. For eight and for twenty-four dimensions, it was only proven in 2016.

From crystals to error correction in data

In physics, packing density explains why metals are so heavy. Their atoms often arrange themselves in a densest sphere packing. Powder compaction in industry also relies on these values, for instance with tablets or ceramics. Anyone ordering gravel for a construction site is likewise buying volume with air in between.

Less obvious is the connection to computer science. Digital messages are protected against transmission errors by placing permitted codewords far apart from one another. Each codeword is given a sphere of similar, still correctable signals. These spheres should lie as densely as possible without overlapping. It is mathematically the same problem, just in very many dimensions.

That is why sphere packings sometimes appear in the news alongside mobile networks, satellite transmission, or data storage. Vector search in AI systems is also about densely packed points in high-dimensional spaces. There, texts are represented as long lists of numbers, and similar content lies close together. The geometry behind this is related to the question from the fruit crate.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.