How can points be distributed on a unit sphere such that they maximize the minimum distance between any pair of points? This maximum distance is called the covering radius, and the configuration is called a spherical code (or spherical packing). In 1943, Fejes Tóth proved that for points, there always exist two points whose distance is
(1)

and that the limit is exact for , 4, 6, and 12. The problem of spherical packing is therefore sometimes known as the Fejes Tóth's problem. The general problem has not been solved.
Spherical codes are similar to the Thomson problem, which seeks the stable equilibrium positions of classical electrons constrained to move on the surface of a sphere and repelling each other by an inverse square law.
An approximate spherical code for points may be obtained in the Wolfram Language using the function SpherePoints[n].
For two points, the points should be at opposite ends of a diameter. For four points, they should be placed at the polyhedron vertices of an inscribed regular tetrahedron. There is no unique best solution for five points since the distance cannot be reduced below that for six points. For six points, they should be placed at the polyhedron vertices of an inscribed regular octahedron. For seven points, the best solution is four equilateral spherical triangles with angles of . For eight points, the best dispersal is not the polyhedron vertices of the inscribed cube, but of a square antiprism with equal polyhedron edges. The solution for nine points is eight equilateral spherical triangles with angles of . For 12 points, the solution is an inscribed regular icosahedron.
A spherical packing corresponds to the placement of spheres around a central unit sphere. From simple trigonometry,
(2)

so the radii of the spheres are given by
(3)

for a minimum separation angle of . Hardin and Sloane give tables of minimum separations and sphere positions for and , 4, 5.
"Almost" 13 spheres can fit around a central sphere in the sense that there is a gap left over when 12 spheres are in place which is nearly big enough for an additional sphere (left figure). In fact, the radii of the spheres can be increased to 1.10851 (assuming a central unit sphere) before 12 spheres no longer fit (middle figure). In order to fit 13 spheres around a central unit sphere, their radius must be no larger than 0.916468 (right figure). These values correspond to Hardin and Sloane's angles of and , respectively.
Pack eight unit spheres whose centers are at the vertices of a cube. Then the radius of the largest sphere which fits in the center hole (left figure) is given by
(4)

giving
(5)

Similarly, the radius of the largest sphere which can be passed through from one side to another (right figure) has
(6)

with
(7)

giving
(8)
