The electron localization function ͑ELF͒ has been proven so far a valuable tool to determine the location of electron pairs. Because of that, the ELF has been widely used to understand the nature of the chemical bonding and to discuss the mechanism of chemical reactions. Up to now, most applications of the ELF have been performed with monodeterminantal methods and only few attempts to calculate this function for correlated wave functions have been carried out. Here, a formulation of ELF valid for mono-and multiconfigurational wave functions is given and compared with previous recently reported approaches. The method described does not require the use of the homogeneous electron gas to define the ELF, at variance with the ELF definition given by Becke. The effect of the electron correlation in the ELF, introduced by means of configuration interaction with singles and doubles calculations, is discussed in the light of the results derived from a set of atomic and molecular systems.