In this paper we determine the inelastic contribution to the energy losses by swift heavy ions in dense matter. At equilibrium, the charge transfer stopping is determined by a simple energy balance and the excitation stopping is determined by the photons emission. Using an average atom model, we determine the density influence on these inelastic stoppings.