The van der Waals equation is based on two simple corrections to the ideal gas law:

.

The factor in the equation of state accounts for the neglected intermolecular forces in the ideal gas law, and the factor accounts for the finite size of the gas molecules. To quantify deviation from ideal behavior, we define the compressibility factor by writing the equation of state in the form

.

For the van der Waals gas (neglecting the term containing ),

.

This can show either positive or negative deviations from ideality, depending on the particular values for and . Positive deviations are due to the molecules having a finite size (so are dependent on the magnitude of ) and negative deviations are a result of the intermolecular forces (so are dependent on the magnitude of ).

If and are zero, the equation of state reduces to the ideal gas law, and the compressibility equals 1.