  In this Tutorial, we describe the use of the quasiharmonic approximation and
first-principles density functional theory (DFT) to calculate and analyze the
thermal expansion of insulating solids. We discuss the theory underlying the
quasiharmonic approximation, and demonstrate its practical use within two
common frameworks for calculating thermal expansion: the Helmholtz free energy
framework and Gr\"{u}neisen theory. Using the example of silicon, we provide a
guide for predicting how the lattice parameter changes as a function of
temperature using DFT, including the calculation of phonon modes and phonon
density of states, elastic constants, and specific heat. We also describe the
calculation and interpretation of Gr\"{u}neisen parameters, as well as how they
relate to coefficients of thermal expansion. The limitations of the
quasiharmonic approximation are briefly touched on, as well as the comparison
of theoretical results with experimental data. Finally, we use the example of
ferroelectric PbTiO$_3$ to illustrate how the methods used can be adapted to
study anisotropic systems.
