We briefly review theoretical methods used to examine dense carbon-bearing minerals, focusing on first-principles or ab initio approaches. To compute the energies, one can choose one among a hierarchy of theoretical approximations. The energetics of the phases considered in this chapter have also been studied using quantum chemistry methods. These approaches have been applied, for example, to pure carbon phases (Guth 1990; Che et al. 1999). A leading approach is density functional theory (Hohenberg and Kohn 1964; Kohn and Sham 1965), which in principle is an exact quantum-mechanical theory, but in practice requires approximations, such as the LDA (local density approximation: Perdew and Wang 1992). Early LDA calculations proved successful in predicting the high-pressure behavior of carbon (e.g., Fahy et al. 1986; Fahy and Louie 1977). Recent extensions of the LDA include GGA (generalized gradient approximation: Perdew et al. 1996), meta-GGA (Tao et al. 2003), or higher-level approximations currently under development. The only approximate term in the equations is the exchange-correlation energy (the non-classical part of the electron-electron interaction energy), the most successful approximations of which are based on the properties of the electron gas, with more advanced approximations taking into account more non-local features, for example, gradient, Laplacian, or orbital kinetic energy density. The usual accuracy of such approximations as LDA and GGA is on the order of 1-2% for bond lengths and unit-cell parameters, where LDA usually underestimates and GGA overestimates bond lengths; ~15% for the elastic constants; and ~5% for vibrational frequencies. For phase transitions and chemical reactions, the GGA seems to perform much better than the LDA, with phase transition pressures accurate to within ~5 GPa (usually overestimated); however, for metal-insulator transitions errors of both approximations are typically much larger. For ionic and covalent materials and for normal metals (carbon allotropes and most carbonates and perhaps carbides belong to these classes) both LDA and GGA give good description of the structural properties and thermodynamics. Large errors in all compounds are documented for calculations of electronic excitation energies and band gaps (both LDA and GGA significantly underestimate band gaps); one must employ special methods, such as the GW method (Aryasetiawan and Gunnarsson 1998), to compute these parameters. Mott insulators represent a particular pathological case, where today's DFT too often gives unreasonable results. Until recently, DFT calculations could not adequately account for van der Waals interactions, but ways for incorporating these effects are now possible (Dion et al. 2004; Roman-Perez and Soler 2009).