In geometry, a sphere packing is an arrangement of non-overlapping spheres within a containing space. The spheres considered are usually all of identical size, and the space is usually three-dimensional Euclidean space. However, sphere packing problems can be generalized to consider unequal spheres, spaces of other dimensions (where the problem becomes circle packing in two dimensions, or hypersphere packing in higher dimensions) or to non-Euclidean spaces such as hyperbolic space.

A typical sphere packing problem is to find an arrangement where the spheres fill as much of the space as possible. The proportion of space filled by the spheres is called the packing density of the arrangement. As the local density of a packing in an infinite space can vary depending on the volume over which it is measured, the problem is usually to maximise the average or asymptotic density, measured over a large enough volume.

For equal spheres in three dimensions, the densest packing uses approximately 74% of the volume. A random packing of equal spheres generally has a density around 63.5%.

Classification and terminology A lattice arrangement (commonly called a regular arrangement) is one where the points of the lattice form a very symmetric pattern that, in n-dimensional Euclidean space, needs only n vectors to be defined. Lattice arrangements are periodic, and have the property that when the lattice is translated (moved) so that one point is placed where another was, the arrangement is the same as before. Arrangements where the points do not form a lattice can still be periodic, but also aperiodic, which includes random arrangements. Lattice packings are easier to classify than those that are not lattices due to their high degree of symmetry. Periodic lattices have well-defined densities.

Regular packing

Dense packing

In three-dimensional Euclidean space, the densest packing of equal spheres is achieved by a family of structures called close-packed structures. One method for generating such a structure is as follows. Consider a plane with a compact arrangement of spheres on it. Call it A. For any three neighboring spheres, a fourth sphere can be placed on top in the hollow between the three bottom spheres. If we do this for half of the holes in a second plane above the first, we create a new compact layer. There are two possible choices for doing this, call them B and C. Suppose that we chose B. Then one half of the hollows of B lies above the centres of the balls in A and one half lies above the hollows of A that were not used for B. Thus the balls of a third layer can be placed either directly above the balls of the first one, yielding a layer of type A, or above the holes of the first layer that were not occupied by the second layer, yielding a layer of type C. Combining layers of types A, B, and C produces various close-packed structures.

Two simple arrangements within the close-packed family correspond to regular arrangements. One is called cubic close packing (or face-centred cubic, "FCC", which is a lattice)—where the layers are alternated in the ABCABC... sequence. The other is called hexagonal close packing ("HCP", which, although being a regular arrangement, is not a lattice), where the layers are alternated in the ABAB... sequence. But many layer stacking sequences are possible (ABAC, ABCBA, ABCBAC, etc.), and still generate a close-packed structure. In all of these arrangements each sphere touches 12 neighboring spheres, and the average density is

In 1611, Johannes Kepler conjectured this was the maximum possible density amongst both regular and irregular arrangements—this became known as the Kepler conjecture. In 1831, Carl Friedrich Gauss proved these packings have the highest density amongst all possible lattice packings. In 1998, Thomas Callister Hales, following the approach suggested by László Fejes Tóth in 1953, announced a proof of the Kepler conjecture. Hales' proof is a proof by exhaustion involving the checking of many individual cases using complex computer calculations. Referees said they were "99% certain" of the correctness of Hales' proof. On 10 August 2014, Hales announced the completion of a formal proof using automated proof checking, removing any doubt.

Other common lattice packings

Some other lattice packings are often found in physical systems. These include the cubic lattice with a density of , the hexagonal arrangement with a density of and the tetrahedral arrangement with a density of .

Jammed packings with a low density Packings where all spheres are constrained by their neighbors to stay in one location are called rigid or jammed. The strictly jammed (mechanically stable even as a finite system) regular sphere packing with the lowest known density is a diluted ("tunneled") fcc crystal with a density of only . The loosest known regular jammed packing has a density of approximately 0.555.

Irregular packing

If we attempt to build a densely packed collection of spheres, we will be tempted to always place the next sphere in a hollow between three packed spheres. If five spheres are assembled in this way, they will be consistent with one of the regularly packed arrangements described above. However, the sixth sphere placed in this way will render the structure inconsistent with any regular arrangement. This results in the possibility of a random close packing of spheres that is stable against compression. Vibration of a random loose packing can result in the arrangement of spherical particles into regular packings, a process known as granular crystallisation. Such processes depend on the geometry of the container holding the spherical grains.

When spheres are randomly added to a container and then compressed, they will generally form what is known as an "irregular" or "jammed" packing configuration when they can be compressed no more. This irregular packing will generally have a density of about 64%. Recent research predicts analytically that it cannot exceed a density limit of 63.4%. This situation is unlike the case of one or two dimensions, where compressing a collection of 1-dimensional or 2-dimensional spheres (that is, line segments or circles) will yield a regular packing.

Hypersphere packing

The sphere packing problem is the three-dimensional version of a class of ball-packing problems in arbitrary dimensions. In two dimensions, the equivalent problem is packing circles on a plane. In one dimension it is packing line segments into a linear universe.

The densest lattice packings of hyperspheres are known for 1–8 and 24 dimensions. Comparatively little is known about non-lattice hypersphere packings, the optimal result being known only in dimensions 1–3, 8, and 24; it is possible that in some dimensions the densest packing may be irregular. Some support for this conjecture comes from the fact that in certain dimensions (e.g. 10) the densest known irregular packing is denser than the densest known regular packing. In 1999, Alexander Vardy showed the density of non-lattice sphere packings in dimensions just below a power of 2 (for example, 25–31 and 55–63, just below 32 and 64 respectively) could be doubled using binary codes which are orthogonal.

In 2016, Maryna Viazovska announced a proof of the E8 lattice, which has a packing density of , providing the optimal packing (regardless of regularity) in eight-dimensional space. Soon afterwards, she and a group of collaborators announced a similar proof of the Leech lattice, with a density of , being optimal in 24 dimensions. These results built on and improved previous methods which showed these two lattices were very close to optimal. The new proofs involved using the Laplace transform of a carefully chosen modular function to construct a radially symmetric function , such that and its Fourier transform   both equal 1 at the origin, and both vanish at all other points of the optimal lattice, with negative outside the central sphere of the packing and positive. Then, the Poisson summation formula for is used to compare the density of the optimal lattice with that of any other packing.. Video of an hour-long talk by one of Viazovska's co-authors explaining the new proofs. Before the proof was formally refereed and published, mathematician Peter Sarnak called the proof "stunningly simple" and wrote that "You just start reading the paper and you know this is correct."

Another line of research in high dimensions is trying to find asymptotic bounds for the density of the densest packings. For large , the densest lattice in dimension has density between (for some constant ) and . Conjectural bounds lie in between. In a 2023 preprint, Marcelo Campos, Matthew Jenssen, Marcus Michelen and Julian Sahasrabudhe announced an improvement to the lower bound of the maximal density to ; among their techniques they made use of the Rödl nibble.

In an April 2025 preprint, Bo'az Klartag announced a significant further improvement: . His process used C. A. Rogers' method of compressing ellipsoids into spheres, instead of Hermann Minkowski's method of searching for the most optimal lattices. For any dimension, Klartag's method produced times denser packings than previous results. Since then, Klartag's ideas have been further improved to show for infinitely many . This result applies the cyclotomic symmetries introduced by Akshay Venkatesh to Klartag's ellipsoid method.

In August 2026, OpenAI announced a claimed proof of an improved asymptotic upper bound, , where

The claimed proof was obtained using their then-unreleased Astra model. It resolved a 2020 conjecture of Afkhami-Jeddi, Cohn, Hartman, de Laat, and Tajdini, by establishing the exact asymptotic decay rate of the Cohn–Elkies linear program, proving that is the exact barrier of the linear programming method.

Unequal sphere packing

Many problems in the chemical and physical sciences can be related to packing problems where more than one size of sphere is available. Here there is a choice between separating the spheres into regions of close-packed equal spheres, or combining the multiple sizes of spheres into a compound or interstitial packing. When many sizes of spheres (or a distribution) are available, the problem quickly becomes intractable, but some studies of binary hard spheres (two sizes) are available.

When the second sphere is much smaller than the first, it is possible to arrange the large spheres in a close-packed arrangement, and then arrange the small spheres within the octahedral and tetrahedral gaps. The density of this interstitial packing depends sensitively on the radius ratio, but in the limit of extreme size ratios, the smaller spheres can fill the gaps with the same density as the larger spheres filled space. Even if the large spheres are not in a close-packed arrangement, it is always possible to insert some smaller spheres of up to of the radius of the larger sphere.

When the smaller sphere has a radius greater than of the radius of the larger sphere, it is no longer possible to fit into even the octahedral holes of the close-packed structure. Thus, beyond this point, either the host structure must expand to accommodate the interstitials (which compromises the overall density), or rearrange into a more complex crystalline compound structure. Structures are known that exceed the close packing density for radius ratios up to .

Upper bounds for the density that can be obtained in such binary packings have also been obtained using a continuous analog of the sum of squares hierarchy of semidefinite programs.

For many chemical structures such as ionic crystals, their stoichiometry is constrained by the charges of the constituent ions. This additional constraint on the packing, together with the need to minimize the Coulomb energy of interacting charges, leads to a diversity of optimal packing arrangements.