In the present work, the information gained by an electron for "knowing" about the position of another electron with the same spin is calculated using the Kullback-Leibler divergence (DKL) between the same-spin conditional pair probability density and the marginal probability. DKL is proposed as an electron localization measurement, based on the observation that regions of the space with high information gain can be associated with strong correlated localized electrons. Taking into consideration the scaling of DKL with the number of σ-spin electrons of a system (Nσ), the quantity χ = (Nσ - 1) DKLfcut is introduced as a general descriptor that allows the quantification of the electron localization in the space. fcut is defined such that it goes smoothly to zero for negligible densities. χ is computed for a selection of atomic and molecular systems in order to test its capability to determine the region in space where electrons are localized. As a general conclusion, χ is able to explain the electron structure of molecules on the basis of chemical grounds with a high degree of success and to produce a clear differentiation of the localization of electrons that can be traced to the fluctuation in the average number of electrons in these regions.