where E D,q and E host are the total energies of the supercell with and without the defect, respectively, and E F is the Fermi energy. n i is the number of atoms of element i added (n i > 0) or removed (n i < 0) to create defect D. The elemental chemical potentials µ i are expressed relative to the reference state chemical potentials (µ 0 i ) such that µ i = µ 0 i + ∆µ i , where ∆µ i is the deviation from the reference state. The reference state chemical potential µ 0 i of each element was determined by fitting to a set of experimentallymeasured formation enthalpies of several compounds under standard conditions. The fitted elemental reference energies for each element considered in this study are listed in Table Corrections to the defect formation energy (E corr ) arising from finite-size effects were calculated following the methodology of Lany and Zunger. Finite-size corrections are applied to address: (i) misalignment of the average electrostatic potential between supercells with and without charged defects, (ii) long-range electrostatic interactions between periodic images of point charges, and (iii) Moss-Burnstein band filling due to shallow defects. The free charge carrier concentrations were calculated following the charge neutrality condition ∑ D q qN D e -∆E D q /k B T + pn = 0 (4)