How this calculation works
Two sphere surfaces can meet along a circle, but the enclosed solid balls share a three-dimensional lens. This calculator finds that common volume. It first checks whether the balls are disjoint, tangent or contained, avoiding formulas that divide by a zero center distance. In the partial-overlap case, the common solid is split at the intersection plane into one spherical cap from each ball, and the two cap volumes are added.
For partial overlap, V=πh1²(r1−h1/3)+πh2²(r2−h2/3); handle disjoint and contained balls first.A worked example
Two unit spheres with center distance one have equal cap heights one half. Each cap has volume π(1/2)²(1−1/6)=5π/24, giving overlap 5π/12≈1.30899694. A unit ball itself has volume 4π/3, so the common portion is 5/16=0.3125 of either ball. If their centers coincide instead, the common volume is the entire unit ball, not a division-by-zero exception.
Good to know
The inputs are two positive radii and a nonnegative center separation in one length unit. Output volume uses the cube of that unit. Numerical scaling reduces overflow but does not guarantee relative accuracy for vanishing near-tangent lenses. This is a ball-volume calculation, not a surface-area or intersection-circle calculation. Radii are limited to 10⁻⁹ through 10⁹ and separation to zero through 10⁹.
Reference: Wolfram Research — sphere-sphere intersection and common volume (opens in a new tab) ↗
Containment has a shared solid even without a surface intersection circle
When one ball lies strictly inside another, their surfaces do not intersect, yet their common volume is the full smaller ball. A surface-intersection routine that reports no circle must therefore not be read as zero common volume. The calculator classifies center distance at or below the radius difference before constructing caps, including concentric balls of unequal radii and coincident balls of equal radii.
At external tangency the common solid has zero volume. At internal tangency the smaller ball is still wholly contained and retains its full volume as the overlap. These two tangent configurations are geometrically different. The classification and the fraction of the smaller ball help distinguish them without requiring a drawing whose appearance could be misleading when the radii differ greatly.
The Spherical polygon area calculator from latitude and longitude measures a surface region, while this page measures a three-dimensional volume shared by two solid balls.
The two cap heights belong to different radii
The intersection plane is generally not halfway between centers. Its position is determined by both radii, and the cap height associated with the first ball cannot simply be reused for the second. In the equal-radius example symmetry justifies equal heights; with unequal radii the construction produces a different pair. Swapping the radius labels must exchange those heights while preserving the total common volume.
The result concerns ideal Euclidean balls. Physical droplets, deformed contact bodies or uncertain measurement boundaries may require a different model. Multiplying every length by a factor multiplies common volume by the factor cubed, while the coverage fraction stays unchanged. The existing intersection-circle calculator describes the two sphere surfaces; it cannot replace this solid-volume calculation simply because both problems begin with the same radii and center distance.
A few questions, answered
Why are only radii and center distance needed?
Rotating or translating both balls together leaves their common volume unchanged. Their relative separation and radii determine the geometry.
Does the coverage fraction refer to both balls?
It uses the smaller ball as its denominator. With unequal radii, the same overlap covers a different fraction of the larger ball.