TiO
2
anatase is considered to play a significant importance in energy and environmental research. However, for developing artificial photosynthesis with TiO
2
, the major drawback is its large bandgap of 3.2 eV. Several non-metals have been used experimentally for extending the TiO
2
photo-absorption to the visible region of the spectrum. It’s therefore of paramount importance to provide theoretical guidance to experiment about the kind of defects that are thermodynamically stable at a realistic condition (e.g. Temperature (
T
), oxygen partial pressure (
), doping). However, disentangling the relative stability of different types of defects (viz. substitution, interstitial, etc.) as a function of charge state and realistic
T
,
is quite challenging. We report here using state-of-the-art first-principles based methodologies, the stability and meta-stability of different non-metal dopants X (X = N, C, S, Se) at various charge states and realistic conditions. The ground state electronic structure is very accurately calculated via density functional theory with hybrid functionals, whereas the finite
T
and
effects are captured by
ab initio
atomistic thermodynamics under harmonic approximations. On comparing the defect formation energies at a given
T
and
(relevant to the experiment), we have found that Se interstitial defect (with two hole trapped) is energetically most favored in the p-type region, whereas N substitution (with one electron trapped) is the most abundant defect in the n-type region to provide visible region photo-absorption in TiO
2
. Our finding validates that the most stable defects in X doped TiO
2
are not the neutral defects but the charged defects. The extra stability of
is carefully analyzed by comparing the individual effect of bond-making/breaking and the charge carrier trapping energies.