We perform first-principles density-functional calculations to investigate the electronic and atomic structure and formation energies of native defects and selected impurities ~O, Si, and Mg! in InN. For p-type material, the nitrogen vacancy has the lowest formation energy. In n-type material all defect formation energies are high. We discuss the effect of the band-gap underestimate in density functional theory ~DFT!, and compare the defect electronic structure obtained using DFT ~in the local-density approximation, LDA! with a recently developed self-interaction and relaxation-corrected ~SIRC! pseudopotential treatment. The SIRC calculations affect the positions of some of the defect states in the band gap, but the general conclusions obtained from the standard DFT-LDA calculations remain valid. Indium nitride is the least studied of the group-III-nitride materials, which are currently under intense investigation. Bulk InN is difficult to prepare due to its low thermal stability; 1 reliable experimental information about the properties of InN is therefore scarce. Indium-containing nitride alloys are an important constituent in devices: for example, the active layer in short-wavelength light-emitting diodes and laser diodes usually consists of In xGa12xN. Not intentionally doped InN has often been found to have very high electron densities—an observation similar to GaN before better doping control of that material was achieved. The unintentional n-type conductivity of InN has been attributed to the nitrogen vacancy (VN) or to the nitrogen antisite. 2 In order to control the material properties and ultimately the device characteristics, an understanding of native defects and impurities in the III nitrides and their alloys is essential. The calculations reported here show that neither vacancies nor antisites can explain the observed n-type conductivity of InN. We have therefore examined oxygen and silicon impurities, finding that they act as donors and that they can easily be incorporated during growth. First-principles calculations based on density functional theory ~DFT! within the local density approximation ~LDA! have produced important information about defects and impurities in semiconductors in general, and the nitrides in particular. 3,4 It is well known, however, that DFT-LDA produces band gaps significantly smaller than experiment. 5 Defects can introduce levels in the band gap; when these levels are occupied with electrons, they contribute to the total energy of the system. If the energetic position of the defect levels is incorrect due to the band-gap error, the resulting total energy may also be affected. The band-gap error results largely from a discontinuity in the exchange-correlation potential upon addition of an extra electron. 6 This discontinuity is inherent to the Kohn-Sham treatment of DFT; indeed, we have found that use of the generalized gradient approximation ~GGA! offers no improvement over LDA with respect to the band-gap problem. 7