An empirical formula is proposed for predicting the cross sections of fragments in a spallation reaction. The cross sections of fragments measured in the 300, 500, 750, 1000 and 1500 MeV u−1 56Fe + p spallation reactions are analysed. The mass and incident energy dependence of the isotopic yield have been considered in the empirical formula. The cross sections of fragments predicted by the proposed empirical formula and the spallation residue cross section (spacs) parameterizations have been compared to the experimental results, showing that both of them can predict the results well. The cross sections of fragments in the 1000 MeV u−1 136Xe + p reactions can also be predicted by the proposed formula, while the spacs parameterizations significantly underestimate the measured results. The empirical formula is useful for predicting the yield of radioactive nuclei produced in proton therapy.