Van der Waals Equation Calculator (Real Gas Pressure)
Calculate real-gas pressure with the Van der Waals equation.
Pick a gas for its a and b constants, then compare against the ideal gas law and find Z.
Why the ideal gas law is not enough
The ideal gas law, PV = nRT, treats gas molecules as dimensionless points that never attract each other. That works beautifully at low pressure and high temperature, where molecules are far apart and barely interact. It falls apart when you compress a gas or cool it toward its condensation point, exactly the conditions inside engines, refrigeration cycles, and chemical reactors. Johannes Diderik van der Waals fixed this in 1873 with two small corrections, work that won him the 1910 Nobel Prize in Physics.
The equation
(P + a × n² / V²) × (V − n × b) = n × R × T
Two correction terms, each with a clear physical meaning:
- The b term (V − nb) accounts for the volume the molecules themselves occupy. Real molecules are not points; they take up space, so the volume actually available for movement is less than the container volume. b is roughly the volume of one mole of the molecules.
- The a term (added to P) accounts for intermolecular attraction. Molecules pull on each other, which reduces the force they exert on the walls, so the measured pressure is lower than the ideal value. The a constant is larger for gases with strong attractions (polar molecules, larger molecules).
Solved explicitly for pressure, which is what this calculator does:
P = nRT / (V − nb) − a × n² / V²
The constants a and b are gas-specific
| Gas | a (L²·atm/mol²) | b (L/mol) |
|---|---|---|
| Helium | 0.0346 | 0.0238 |
| Hydrogen | 0.2476 | 0.0266 |
| Nitrogen | 1.370 | 0.0387 |
| Oxygen | 1.382 | 0.0319 |
| Carbon dioxide | 3.640 | 0.0427 |
| Water vapor | 5.536 | 0.0305 |
| Methane | 2.283 | 0.0428 |
| Ammonia | 4.225 | 0.0371 |
| Argon | 1.355 | 0.0320 |
Notice helium has a tiny a (a noble gas with almost no intermolecular attraction) while water and ammonia have large a values (strong hydrogen bonding). That single number predicts which gases liquefy easily.
The compressibility factor Z
A clean way to measure how non-ideal a gas is behaving:
Z = PV / (nRT)
For an ideal gas, Z = 1 exactly. When Z < 1, attractions dominate and the gas is more compressible than ideal (common at moderate pressure). When Z > 1, the finite molecular volume dominates and the gas resists compression (common at very high pressure). This calculator reports Z so you can see at a glance how far from ideal your conditions are.
When the corrections matter
At 1 atm and room temperature, most gases are within 1 percent of ideal, so PV = nRT is fine. The van der Waals corrections become significant when:
- Pressure is high (tens of atmospheres or more), as in compressed gas cylinders, scuba tanks, and engine cylinders.
- Temperature is low, approaching the gas’s boiling point, where attractions start to win.
- The gas has strong intermolecular forces (steam, ammonia, carbon dioxide) rather than weak ones (helium, hydrogen).
Worked example, CO2 under pressure
One mole of carbon dioxide in a 1.0 L vessel at 320 K. Using a = 3.640, b = 0.0427, R = 0.08206:
Ideal: P = nRT/V = (1)(0.08206)(320)/1 = 26.26 atm
Van der Waals: P = (0.08206 × 320)/(1 − 0.0427) − 3.640/1 = 26.26/0.9573 − 3.640 = 27.43 − 3.64 = 23.79 atm
The real pressure is about 9 percent lower than the ideal prediction. At these conditions the attractive a term wins, pulling molecules inward and lowering the wall pressure. Design a CO2 system off the ideal number and you would oversize the vessel rating by nearly 10 percent.
The deeper payoff
The van der Waals equation was the first model to predict gas-to-liquid condensation from a single equation. Below a critical temperature its pressure-volume curve develops a wiggle that signals the liquid-vapor transition. It is not the most accurate real-gas model today (Redlich-Kwong, Peng-Robinson, and others refine it for industrial use), but it remains the one that first showed why gases turn into liquids, which is why every thermodynamics course still teaches it.