We present a technique aimed at preventing plane-wave-based total energy and stress calculations from the effect of abrupt changes in basis set size. This scheme relies on the interpolation of energy as a function of the number of plane waves and on scaling hypothesis that allows us to perform the interpolation for a unique reference volume. From a theoretical point of view, the method is compared to those already proposed in the literature, and its more rigorous derivation is emphasized. From a practical point of view, we illustrate the importance of the correction on different materials (Si, BaTiO3, and He) corresponding to different types of bonding, and to different k-point samplings and cutoff energies. Then, we compare the different approaches for the calculation of a0, B0, and B0′ in bulk silicon.