The phase stability of silicon nitride is examined using a series of first principles phonon calculations. -phase shows slightly higher free energy than in the temperature range from 0 to 2000K. The difference between and is only 0.02 eV/Si3N4 or 2 kJ/mol at 300 K. The result is consistent with the experimental report by high-temperature oxide-melt-drop solution-calorimetry. Similar calculations are made for ZrO2, Ga2O3, BN and some perovskites. Using cluster expansion technique combined with a large set of first principles calculations, the cation disordering of II-III spinel oxides and the phase diagram of diamond vs. c-BN are theoretically investigated. Theoretical results on the atomic structures of and sialons are also shown.