Compute first the diagonal length $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$. An edge of the cube has length $s=d/\sqrt3$ and $V=s^3=d^3/(3\sqrt3)$.
Compute first the diagonal length $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$. An edge of the cube has length $s=d/\sqrt3$ and $V=s^3=d^3/(3\sqrt3)$.