Throughout geological history, partial melting of mantle rocks and magma ascent and crystallization have played key roles in shaping the Earth. The importance of magmas stems from their liquid nature, that is, from their high atomic mobility and lack of long-range order. Compared to crystals, magmas thus have peculiar thermodynamic properties. A few examples illustrate how solid–liquid and liquid–volatile equilibria can be predicted. Given the almost infinite diversity of conditions of chemical composition, temperature and pressure in nature, thermodynamic modelling has become a necessary tool for understanding magmatic processes.