Van der Waals Equation Calculator
The van der Waals equation corrects the ideal gas law for the finite size of molecules and the attractive forces between them. Select a gas or enter custom constants, then provide three of the four state variables (pressure, volume, temperature, moles) to solve for the fourth. Results include a comparison with the ideal gas law and a breakdown of the correction terms.
What is the van der Waals equation?
The van der Waals equation is a thermodynamic equation of state that improves on the ideal gas law by accounting for two physical realities that the simpler model ignores. First, real molecules occupy space: they cannot overlap, so the volume available for motion is the container volume minus the space the molecules themselves occupy (the excluded volume, nb). Second, real molecules attract each other: these attractive forces effectively reduce the pressure the gas exerts on the walls. Johannes Diderik van der Waals introduced both corrections in his 1873 doctoral thesis and was awarded the Nobel Prize in Physics in 1910 for this work. The equation reads (P + an^2/V^2)(V - nb) = nRT, where P is pressure, V is volume, n is the amount in moles, R is the gas constant, T is absolute temperature, a is the attraction parameter, and b is the excluded-volume parameter.
How to use this calculator
Choose the gas from the drop-down list, or select Custom and enter your own a and b values. Then select which variable you want to solve for (pressure, volume, temperature, or amount of substance). Fill in the three known values and the calculator solves the remaining one instantly. The results panel shows the van der Waals answer alongside the ideal-gas prediction and the percentage deviation, so you can see how much the real-gas corrections matter at your chosen conditions. The pressure-volume isotherm chart (available when solving for pressure) plots both the van der Waals curve and the ideal-gas curve at constant temperature and mole count, making the difference visible at a glance.
Understanding the correction terms
The constant a captures how strongly molecules attract each other. Noble gases such as helium and neon have tiny a values (close to zero) because their outer electron clouds are nearly spherically symmetric and do not create strong polarization. Polar molecules such as ammonia and water have much larger a values because permanent dipoles and hydrogen bonding create substantial attraction. The constant b is proportional to the actual volume of one mole of molecules. Larger molecules have larger b: propane (b = 0.090 L/mol) occupies far more space per mole than neon (b = 0.017 L/mol). At high pressures or low temperatures, both corrections become large and the gas departs strongly from ideal behavior. At low pressures and high temperatures, the corrections shrink and the van der Waals equation converges toward PV = nRT.
When the ideal gas law breaks down
The ideal gas law (PV = nRT) works well when molecules are far apart and moving fast: low pressures (typically below a few atm) and high temperatures (well above the boiling point). It breaks down when intermolecular forces become significant relative to kinetic energy (low temperature, high pressure, or large polar molecules). A useful rule of thumb is that deviations larger than 1% from ideal behavior become noticeable when the reduced pressure (P/Pc) exceeds about 0.1, where Pc is the critical pressure of the gas. For carbon dioxide at 300 K and 10 atm, the van der Waals result differs from ideal by roughly 4%. For water vapor at the same conditions the difference is larger still because the high a value reflects strong hydrogen bonding.
Van der Waals constants for common gases
| Gas | Formula | a (atm·L^2/mol^2) | b (L/mol) | Character |
|---|---|---|---|---|
| Helium | He | 0.0341 | 0.02370 | Near-ideal |
| Neon | Ne | 0.205 | 0.01672 | Near-ideal |
| Hydrogen | H2 | 0.242 | 0.02651 | Near-ideal |
| Argon | Ar | 1.337 | 0.03201 | Moderately real |
| Nitrogen | N2 | 1.351 | 0.03870 | Moderately real |
| Oxygen | O2 | 1.363 | 0.03186 | Moderately real |
| Methane | CH4 | 2.268 | 0.04301 | Moderately real |
| Carbon dioxide | CO2 | 3.605 | 0.04286 | Strongly real |
| Ammonia | NH3 | 4.166 | 0.03713 | Strongly real |
| Water vapor | H2O | 5.462 | 0.03049 | Strongly real |
| Ethane | C2H6 | 5.491 | 0.06499 | Strongly real |
| Propane | C3H8 | 9.251 | 0.09044 | Very strongly real |
Published values for a (atm·L^2/mol^2) and b (L/mol). Source: Chemistry LibreTexts / NIST.
Frequently asked questions
What do the van der Waals constants a and b represent?
The constant a (units: atm·L^2/mol^2) measures the strength of intermolecular attraction. A higher a means molecules pull on each other more strongly and the gas pressure is lower than ideal. The constant b (units: L/mol) is the excluded volume per mole, representing the space one mole of molecules physically occupies. It sets a lower bound on the molar volume: the gas cannot be compressed below nb without molecules overlapping.
Why does the van der Waals equation have three solutions for volume?
The equation is cubic in volume, so it can have up to three real roots. Above the critical temperature there is only one real root, corresponding to the gas phase. Below the critical temperature three roots appear: the smallest is the liquid molar volume, the largest is the gas molar volume, and the middle root is physically unstable. This three-root region is related to the liquid-vapor phase transition and the Maxwell equal-area construction. This calculator returns the largest positive root, the gas-phase volume.
How does this differ from the ideal gas law?
The ideal gas law PV = nRT treats molecules as point masses with no volume and no interactions. The van der Waals equation replaces P with (P + an^2/V^2) to account for attraction (which reduces pressure) and V with (V - nb) to account for molecular size (which reduces free volume). At low pressure and high temperature both corrections are negligible and the two equations give the same answer. At high pressure or low temperature the corrections become significant.
What units does this calculator use?
Pressure is in atmospheres (atm), volume is in litres (L), temperature is in Kelvin (K), and amount in moles (mol). The gas constant used is R = 0.082057 L·atm·mol^-1·K^-1. If your data is in SI units (Pascals, m^3), convert first: 1 atm = 101325 Pa and 1 m^3 = 1000 L.
What is the compressibility factor and how does it relate to this?
The compressibility factor Z = PV/(nRT) measures how much a real gas deviates from ideal behavior. For an ideal gas Z = 1 exactly. For a van der Waals gas, Z varies with conditions: at high pressure Z > 1 (excluded volume dominates) and at moderate pressure Z < 1 (attraction dominates). You can compute Z from the results of this calculator by dividing the van der Waals result by the ideal gas result.