The stability of nitrogen incorporation at protonated titanium vacancy sites, VTi+nH, n = 0−4, and interstitial sites in anatase under oxygen-rich growth conditions has been investigated using density functional theory quantum mechanical modeling. The 0 K DFT energy results were corrected using thermodynamic free energy data to obtain defect formation energies, E
d, at a typical sol−gel calcination temperature of 700 K. Doping of sol−gel anatase was simulated using a 2 × 2 × 1 defected anatase supercell as host, in which one Ti atom was replaced by 4 H atoms, giving [H4]Ti15O32. A number of different nitrogen configurations were found to be stable at VTi sites in the defected anatase, having negative or small positive E
d values at 700 K. These included nitrogen bonded to one, two and three framework oxygen atoms and NH bonded to two framework oxygens, HNO2. Maximum stability due to codoping with H was obtained with one H atom per VTi, although models with up to 3 codoped H atoms gave negative E
d values. An interesting observation was that extra stability was obtained in models where the structure relaxed to give bonding between the N at the VTi site and one of the surrounding Ti atoms, with a Ti−N distance of ∼2 Å. Electronic structure calculations showed that the 2p orbitals of N at a VTi site mix with both O 2p states at the top of the valence band and with Ti 3d states at the bottom of the conduction band. A small amount (∼0.1 eV) of band gap narrowing occurs for N doping at VTi.