Skip to content
Physics

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.

Your details

Choose a preset gas to auto-fill van der Waals constants, or pick Custom to enter your own.
Select which variable you want the calculator to find.
Container volume in litres.
L
Temperature in Kelvin.
K
Number of moles of gas.
mol
Result
11.6768

The solved variable from the van der Waals equation.

Unitatm
Ideal gas prediction12.3086
Deviation from ideal-0.05%
Pressure correction (an^2/V^2)0.9013
Volume correction (nb)0.0429
Constant a3.605
Constant b0.04286
Attraction correction (atm)0.9013
Excluded volume (L)0.0429
Constant a3.605
Constant b0.04286
05k10k01020
Volume (L)
Pressure (atm)
Volume (L)Van der Waals (real gas)Ideal gas (PV = nRT)
0.0510k547.01
0.3848.1965.07
0.7129.6934.59
1.0521.2623.56
1.3816.5417.86
1.7113.5214.38
2.0511.4312.04
2.389.910.35
2.718.739.08
3.057.818.08
3.387.067.29
3.716.456.63
4.055.936.09
4.385.495.62
4.715.115.22
5.054.784.88
5.384.494.58
5.714.234.31
6.0544.07
6.383.83.86
6.713.613.67
7.053.443.49
7.383.293.34
7.713.153.19
8.053.023.06
8.382.92.94
8.712.792.83
9.052.692.72
9.382.62.62
9.712.512.53
10.052.432.45
10.382.352.37
10.712.282.3
11.052.212.23
11.382.142.16
11.712.082.1
12.052.032.04
12.381.971.99
12.711.921.94
13.051.871.89
13.381.831.84
13.711.781.8
14.051.741.75
14.381.71.71
14.711.661.67
15.051.631.64
15.381.591.6
15.711.561.57
16.051.521.53
16.381.491.5
16.711.461.47
17.051.441.44
17.381.411.42
17.711.381.39
18.051.361.36
18.381.331.34
18.711.311.32
19.051.291.29
19.381.261.27
19.711.241.25
20.051.221.23
  • Van der Waals (real gas)
  • Ideal gas (PV = nRT)

Carbon Dioxide (CO2): pressure = 11.6768 atm

  • Real pressure is 5.13% lower than ideal: intermolecular attraction dominates, pulling molecules together and reducing pressure.
  • The attraction correction (an^2/V^2) is 0.9012 atm, reducing effective pressure.
  • The excluded-volume correction (nb) is 0.0429 L, reducing free space for motion.
  • Carbon Dioxide (CO2) has a relatively high attraction constant (a = 3.605), meaning strong intermolecular forces. The ideal gas law significantly underestimates this.

Next stepFor a complete picture of non-ideal behavior, also calculate the compressibility factor Z = PV/(nRT). Z = 1 for a perfect ideal gas; deviations signal real-gas effects.

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

GasFormulaa (atm·L^2/mol^2)b (L/mol)Character
HeliumHe0.03410.02370 Near-ideal
NeonNe0.2050.01672 Near-ideal
HydrogenH20.2420.02651 Near-ideal
ArgonAr1.3370.03201 Moderately real
NitrogenN21.3510.03870 Moderately real
OxygenO21.3630.03186 Moderately real
MethaneCH42.2680.04301 Moderately real
Carbon dioxideCO23.6050.04286 Strongly real
AmmoniaNH34.1660.03713 Strongly real
Water vaporH2O5.4620.03049 Strongly real
EthaneC2H65.4910.06499 Strongly real
PropaneC3H89.2510.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.

Sources

Written by Dr. Tomás Okafor, PhD Physicist · Lagos, Nigeria

Physicist specializing in classical mechanics, bringing 17 years of research and applied dynamics expertise to every calculator he reviews.

Search 3,500+ calculators

Loading search…