Electron energy loss and photoelectron spectra are obtained on the basis of transfer equation solution. The boundary problem is solved using invariant imbedding approach. The partial intensity method is used to calculate electron energy loss and photoelectron spectra. Differential inelastic electron scattering cross sections in bulk aluminium and in a surface layer are extracted by fitting procedure in an energy range 0.5–120 keV. The method of spectra computation is tested by comparison of results with the experimental data of five foreign scientific laboratories. The physical meaning of the surface-excitation parameter is discussed.