The accuracy of quantitative XPS analyses using relative sensitivity factors is increased if matrix effects are accounted for in calculations of surface composition. This requires knowledge of the energy dependence of the inelastic mean free path (IMFP) for a given sample. It is sufficient for routine analyses to use the IMFP energy dependence averaged over a number of solids. A universal energy dependence is found to be better expressed by the Bethe equation than an equation of the form lambda = aE(p), although in both cases the energy dependence is controlled by one parameter. Values for these parameters are shown to depend on the class of solid: elements, inorganic compounds and organic compounds. The deviations of the assumed universal IMFP energy dependence from the true IMFP energy dependences for different solids is largest, exceeding 20%, in the energy range 200-500 eV. This deviation decreases to 3% at energies 500-1500 eV. Photoelectrons with kinetic energies within the latter energy range are recommended for quantitative XPS analysis using calculated sensitivity factors.