where the summation is over all different donor or acceptors, are the doping concentrations, are the degeneracy factors ( and for shallow impurities),
and are the energies of the neutral donor and acceptor impurities, respectively.
These energies of neutral impurities are determined by the ionization energies , the bulk conduction and valence band edges (including shifts due to strain) and the electrostatic potential.