There are several approaches to the description of van der Waals (vdW) forces within density functional theory. While they are generally found to improve the structural and energetic properties of those materials dominated by weak dispersion forces, it is not known how they behave when the material is subject to an external pressure. This could be an issue when considering the pressure-induced structural phase transitions, which are currently attracting great attention following the discovery of an ultrahard phase formed by the compression of graphite at room temperature. In order to model this transition, the functional must be capable of simultaneously describing both strong covalent bonds and weak dispersion interactions as an isotropic pressure is applied. Here, we report on the ability of several dispersion-correction functionals to describe the energetic, structural, and elastic properties of graphite and diamond, when subjected to an isotropic pressure. Almost all of the tested vdW corrections provide an improved description of both graphite and diamond compared to the local density approximation. The relative error does not change significantly as pressure is applied, and in some cases even decreases. We therefore conclude that the use of dispersion-corrected exchange-correlation functionals, which have been neglected to date, will improve the accuracy and reliability of theoretical investigations into the pressure-induced phase transition of graphite.