where N D , g D,q and ∆H(D, q) are the number of sites on which the defect can form, the degeneracy of the defect state and the enthalpy of formation of the defect as calculated in equation 1 respectively. Given a constraint of overall charge neutrality, the electron and hole concentrations can be determined from equations 3 and 4: