Calculating the mass of spherical ball