The entropy (S) of a van der Waals gas can be calculated using statistical mechanics, but it is a complex function of the gas's volume (V), temperature (T), and the number of particles (N). The van der Waals equation accounts for the finite size of molecules and the attraction between them, which are not considered in an ideal gas