How to calculate the average radius of a molecule?

I would like some help in attaining an average molecular radius (arithmetic mean of the distances between each atom and the centroid of the molecule). Thanks!