Let s be the length of an edge of the cube.
Volume of cube = s³ units³
Case 1: Fit sphere into cube
The largest sphere that can fit in the cube has radius r = s/2.
volume of sphere = (4/3)πr³
= (4/3)π(s/2)³
= (4/3)πs³/8
= ⅙πs³
Wasted space = s³ - ⅙πs³ = (1-⅙π)s³ ≅ 0.476s³
47.6% of a sphere in a cube is wasted space
Case 2: Fit cube into sphere
The length of the diagonal of the cube = s√3.
The smallest sphere that will fit around the cube has diameter of s√3
radius r = s√3/2
volume of sphere = (4/3)πr³
= (4/3)π(s√3/2)³
= (4/3)π·3s³√3/8
= ½πs³
wasted space = ½πs³ - s³ = (½π-1)s³
((½π-1)s³)/(½πs³) = (π-2)/π ≅ 0.363
36.3% of a cube in a sphere is wasted space.