Neutron transmutation doping provides a convenient means to shift the doping level and the Fermi energy in semiconductors. In order to understand this shift quantitatively, the position of the Fermi energyEFas a function of the doping levelC[EF(C) characteristic] is calculated and discussed for semiconductors with arbitrary distribution of localized levels. It is shown how theEF(C) characteristic depends on the presence of defect levels in the forbidden gap. In particular,EFis pinned at energy with large density of localized levels, corresponding to a high stability ofEFagainst variations ofC. A quantitative measure of this stability is introduced with the derivativekTdC/dEFfor theEF(C) characteristic. This leads to a new method to determine experimentally the energetic position and concentrations of defects in semiconductors. The method seems to be applicable not only to crystalline semiconductors such as Si or GaAs but also to amorphous silicon.