# Ratio between surface and volume of a sphere and a cube

The surface to volume ratio of a sphere with diameter d is given by $$\frac{\pi d^2}{\frac{1}{6}\pi d^3} = \frac{6}{d}.$$
The surface to volume ratio of a cube with side length d is given by $$\frac{6 d^2}{d^3} = \frac{6}{d}.$$
Hence the ratio is the same in both cases.
Does that contradict the known fact, that a sphere has the lowest possible surface area to volume ratio?

For a sphere you get $$(4\pi r^2)^3 : (\frac43\pi r^3)^2$$ in which the $$r$$s cancel out and we get $$64\pi^3:\frac{16}9\pi^2=36\pi:1$$. For a cube you get $$(6d^2)^3:(d^3)^2=216:1$$. And indeed $$36\pi<216$$.