An algorithm for the exact calculation of the overlap volume of a sphere and a tetrahedron, wedge, or hexahedron is described. The method can be used to determine the exact local solid fractions for a system of spherical, nonoverlapping particles contained in a complex mesh, a question of significant relevance for the numerical solution of many fluid-solid interaction problems. While challenging due to the limited machine precision, a numerically robust version of the calculation maintaining high computational efficiency is devised. The method is evaluated with respect to the numerical precision and computational cost. It is shown that the exact calculation is only limited by the machine precision and can be applied to a wide range of size ratios, contrary to previously published methods. Eliminating this constraint enables the usage of meshes with higher resolution near the system boundaries for coupled CFD–DEM simulations. The numerical robustness is further illustrated by apply...