It is perhaps useful to separate the density of the 'atom' from the density of its 'nucleus'! As you so rightly point out, the atom with its electron cloud and tiny nucleus is mostly empty space. Thus any attempt to calculate the density of the atom in terms of its overall volume and mass will run into problems. if, however, a nuclear model such as Bohr's Liquid Drop Model is used then we can calculate the mass and radius of the nucleus from: -
The liquid drop model of the nucleus (Bohr 1936) gives the mass of the nucleus 'M' as: -
M = Z.M(protons) +(A - Z).M(neutrons) - BE/c²
Where 'Z' is the proton number and 'A' the atomic number with 'BE' as the binding energy given by: -
BE = av.A - 4.ac.(Z.(Z-1)/A^(1/3)) - as.A^(2/3) -ar.((A - 2.Z)²/A) + E
Where the coefficients have values: -
av = 14.0 Mev, ac =0.146 Mev
ar = 19.4 Mev, as = 13.1 Mev
E varies as follows: -
δ = 270 Mev.
This mass equation is known as the 'semi-empirical mass formula' and was derived by considering the nucleus as a liquid drop, with volume energy (the av term), Coulomb energy (the ac term), surface energy (the as term), a symmetry effect due to the neutron excess (the ar term). It works with medium and heavy nuclei (large numbers of nucleons) but does not work well with small or light nuclei (few nucleons).
The mean radius of the nucleus is given, by scattering experiments, to be: -
R(e) = (1.25 ± 0.02).A x 10¯¹⁵ m
Converting the radius value into a volume and dividing into the calculated mass (see above) gives most nuclei as having a density of about 10¹⁸ kg/m³ (10^18 if the superscript is not clear).
Hence, returning to the atomic radius and Avogadro's number it is possible to use the nuclear mass and atomic volume to find a reasonable estimate of the material's average density.