In this paper we predict and evaluate the value of the nuclear charge radius by analyzing the relationship between nuclear mass and nuclear charge radius.We obtain 884 nuclei (
Z,
N≥ 8) with known mass and known charge radii by combining AME2020 database with CR2013 database, and calculate the mass densities
$ \rho_\text{m} $
of the 884 nuclei. We aim to obtain an empirical formula of one constant which is useful in describing and predicting nuclear charge radius. With the empirical formula and the AME2020 database, the root-mean-square deviation (RMSD) of the nuclear charge radius of
$ \sigma = 0.093 $
fm is successfully obtained.Considering the influence of neutron numbers on
$\rho_{\rm{m}}$
, we use the neutron factor
${1}/{N} $
to correct the empirical formula, and the RMSD is reduced to
σ= 0.047 fm (the accuracy is increased by about 50%). The second correction is shell effect of neutrons. The results show that the RMSD of nuclear charge radius is reduced to 0.034 fm based on shell effect of neutrons. We use the empirical formula with corrections to predict the nuclear charge radius (1573 nuclear charge radius with
Z,
N≥ 8) which is difficult to measure experimentally. The difference between our predicted values based on AME2020 database and the experimental values measured in recent years is in the allowable range of deviation. The result shows that the new relation for nuclear charge radius is simple and reliable. In addition, the RMSD of the calculation value for 791 nuclei is reduced to σ = 0.032 fm after we have removed some nuclei with special shell effect and isotope chains. These results show that the new relation proposed in this paper can be comparable to
$ A^{1/3} $
and
$ Z^{1/3} $
formulas with corrections.Moreover, we study the 884 and 791 nuclear mass densities by using L-M neural network method to build description and prediction models. Comparing with CR2013, the RMSDs of nuclear charge radius are
σ= 0.018 fm and
σ= 0.014 fm, respectively. The RMSDs are reduced by about 50% compared with that from the empirical formula with corrections, and the predicted values are closer to the experimental values measured in recent years.