The diameter of the sphere is equal to the diagonal of the cylinder’s height and diameter.

Sphere Inscribed in a Cube
The diameter of the sphere is equal to the length of the cube’s edge.

Sphere Inscribed in a Cylinder
Both the cylinder and the sphere have the same diameter and radius.
