In this study, the dependence of the refraction of light in matter on the energy density of electron clouds was studied. Therefore, one of the goals of this study was to obtain a dispersion formula based on this dependence. Einstein's relativistic formula was taken as the basis for obtaining this formula. After the transformations carried out, a new dispersion formula was obtained from this formula. According to the new formula, 42 refractive indices of light were determined in 12 transparent substances in three states of aggregation. Comparison of the obtained indicators with the laboratory refractive indices of light showed the high accuracy of the dispersion formula, which amounted to ±10 – 6 −10 – 5 in the calculated sections of the 70-90 nm wavelength ranges. This formula can be applied to the same wide range of transparent substances as the empirical formulas of Hartmann, Cauchy, etc. The successful application of the new dispersion formula made it possible to apply the analogy method to the energy density of electron clouds. As a result, the formula for the density of electron clouds of transparent substances was obtained. Sample calculations were made using this formula. These calculations showed a high energy density of electron clouds in matter, which amounted to 𝟏𝟎𝟐𝟒− 𝟏𝟎𝟐𝟓 J/m3.