We address the problem of the modeling of the extinction coefficient into an absorbing medium, including a random distribution of identical scatterers of arbitrary size. We show that the extinction coefficient, including losses in the host medium, can be derived from a diagrammatic expansion arising from the rigorous multiple-scattering theory of electromagnetic waves in random media. While in previous approaches the contribution to the extinction coefficient due to the absorption in the host medium and due to the absorption and scattering by the particles were evaluated separately and heuristically, our approach is based on a derivation from first principles.