The efficient absorption of visible light is crucial for improving the photocatalytic activity of foreign species-doped TiO2. With first-principles calculations, we explore the effects of phosphorus doping on mediating the photocatalytic activity of anatase. It is found that the P impurity tends to occupy the cation site in TiO2; more importantly, there exists a critical phosphorus concentration of about 0.7% for maximizing the absorption of solar light. The optical energy gap is narrowed by ∼0.3 eV at the low doping concentration of 0.7%, whereas it increases with P concentration at the higher P concentration region of 0.7−3.1 atm. %. These results suggest that the dopant concentration dependence might be responsible for numerous seeming controversies of optical absorption observed in experiments. This finding points to a possibility of tailoring the optical absorption of TiO2by varying the dopant content.