Point defects play a dominant role in determining the wide spectrum of electronic and physical properties of semiconducting materials that have vast technological applications. Using ab-initio simulations, a method to calculate equilibrium defect concentrations, Fermi energy and defect stability diagrams as functions of external parameters, such as temperature and pressure, is presented. Using SrTiO3 as a representative material, we report our analysis of the stability of oxygen vacancies and interstitials, in their different charge states, as a function of temperature, oxygen partial pressure and Fermi energy of the system. Further, by analyzing the defect chemistry at experimentally relevant temperatures, we find that at low oxygen partial pressure, neutral oxygen vacancies are most dominant and at intermediate and high oxygen partial pressure, doubly charged oxygen vacancies defects are dominant.