About the Van der Waals Equation
The ideal gas law, PV = nRT, assumes gas molecules are dimensionless points that never interact with each other. Real molecules attract one another at moderate distances and physically occupy space, so real gases deviate from ideal behavior — especially at high pressure or low temperature. In 1873, Johannes Diderik van der Waals proposed a correction: (P + an²/V²)(V − nb) = nRT, where a and b are constants specific to each gas. This calculator applies that equation directly to compute real-gas pressure, and compares it against the ideal gas law so you can see exactly how much — and in which direction — a real gas deviates.
The attraction and volume correction terms
The term an²/V² is added to the measured pressure P because intermolecular attraction pulls molecules toward each other and away from the container walls, so the pressure a real gas exerts is lower than it would be without attraction — the equation adds back that "missing" pressure before comparing to the ideal case. The constant a grows with how strongly a gas's molecules attract each other (polar molecules like water vapor and ammonia have large a values). The term nb is subtracted from the total volume V because gas molecules are not points — they have real physical size — so the space available for molecules to move through is V − nb, not the full container volume. The constant b is closely related to molecular size and is sometimes called the "excluded volume" or "co-volume."
How the calculation works
Enter the amount of gas n (moles), the container volume V with its unit, and the temperature T with its unit, plus the Van der Waals constants a and b — either by picking a preset gas, which fills in textbook values, or by entering your own. The calculator converts volume to liters and temperature to Kelvin, then solves directly for pressure: P = nRT/(V − nb) − an²/V², using R = 0.0820574 L·atm/(mol·K). It also computes the ideal-gas pressure P = nRT/V for the same n, V, and T, the compressibility factor Z = PV/(nRT), and the percent difference between the real and ideal pressures.
When the model breaks down
The Van der Waals equation is a major improvement over the ideal gas law, but it is still an approximation. It becomes least accurate near a gas's critical point, where attraction and volume effects are both large and the simple algebraic form cannot fully capture real molecular behavior; more advanced equations of state (such as Redlich-Kwong or Peng-Robinson) improve on it for engineering-grade accuracy. It also requires V to exceed nb — if a container is too small to physically hold the given amount of gas even in principle, the equation has no physical solution, and this calculator will flag that case rather than return a nonsensical pressure.