By accounting for the volume of the gas molecules as well as the attractive forces that exist between them, the van der Waals equation improves on the ideal gas law.