Vacancies, impurities, and foreign ions dissolving in calcium phosphate bioceramics play an important role in the biological properties of the materials. However, little is known about the thermodynamic stability of the defects. In this regard, point defects in hydroxyapatite (HAp) and octacalcium phosphate (OCP) were calculated in a first-principles manner, and the chemical-potential dependence of the defect formation energies was revealed. In particular, because calcium phosphates are usually subjected to an aqueous solution, a methodology to evaluate ionic chemical potentials under chemical equilibrium of the solid–aqueous solution was introduced. In the present article, recent results based on such a methodology (the solution pH dependence of Ca/P molar ratio of HAp and the ion-exchange ability with foreign cations in HAp and OCP) were reviewed.