Van der Waals Calculator
Pick the quantity you want, supply the other three together with the gas constants a and b, and the calculator applies the van der Waals correction to the ideal gas law. The guide explains the equation, gives constants for common gases and notes where the model stops working.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
About the van der Waals gas calculator
The ideal gas law treats gas molecules as points that never interact. That works well when the gas is thin, but at higher pressures or lower temperatures two real effects start to matter: molecules pull on each other, and they take up space of their own. Johannes van der Waals added one correction for each, giving an equation that predicts the behaviour of real gases noticeably better over a wide range of conditions.
This calculator solves that equation for pressure, volume, temperature or the amount of gas in moles. You choose the unknown, fill in the rest, and the result appears in the unit you select for it.
The van der Waals equation of state
(P + a × n² ÷ V²) × (V − n × b) = n × R × TP pressure, V volume, n moles, T absolute temperature, R = 8.3145 J/(mol·K).
Solving for the pressure gives the form most people use:
P = n × R × T ÷ (V − n × b) − a × n² ÷ V²
- b is the volume excluded by one mole of molecules. It shrinks the space available to the gas, which raises the pressure compared with the ideal case.
- a measures the attraction between molecules. Attraction pulls them toward each other and away from the walls, which lowers the pressure.
- Both constants are specific to each gas and are found in tables. The calculator accepts a in J·m³/mol², Pa·m⁶/mol², bar·m⁶/mol², psi·m⁶/mol² or Torr·m⁶/mol², and b in volume per mole (m³, L, cm³ and others).
Setting a and b to zero recovers PV = nRT. The two constants also fix the critical point: Tc = 8a ÷ (27Rb), Pc = a ÷ (27b²) and Vc = 3b per mole. For carbon dioxide these give a critical temperature of about 304 K, close to the measured value of 304.1 K.
How each mode is calculated
- Pressure and temperature use the equation rearranged exactly, so they are straightforward closed-form answers.
- Volume is a cubic equation in V: P V³ − (P n b + n R T) V² + a n² V − a n³ b = 0. The calculator solves it numerically and returns the gas-like root, the largest real volume, which always lies above n × b. At low pressure this is almost exactly the ideal-gas volume V₀ = nRT ÷ P.
- Moles is also a cubic, this time in n, because both the attraction term a n² ÷ V² and the excluded volume n × b depend on the amount of gas. The calculator solves it numerically and returns the gas-like root, the smallest amount of substance that fits the equation with n × b below V.
Below the critical temperature and within a certain pressure range the cubic has three real roots, which stand for a liquid-like state, a gas-like state and an unstable state between them. The calculator reports the gas-like one. When only one real root exists it is returned whatever its size, so with very large values of a it can sit just above n × b, a state more like a liquid. The temperature must be above absolute zero when you solve for volume or moles. The temperature unit can be K, °C, °F, °R or °Re, and values are converted to kelvin first. The pressure mode does not stop you from entering a volume smaller than nb, which has no physical meaning and can give a negative pressure.
Worked examples
Pressure of carbon dioxide. One mole of CO₂ (a = 0.364 Pa·m⁶/mol², b = 4.267 × 10⁻⁵ m³/mol) sits in a 1 L vessel at 300 K. The repulsion term is nRT ÷ (V − nb) = 8.3145 × 300 ÷ (0.001 − 0.00004267) ≈ 2,605,516 Pa. The attraction term is a n² ÷ V² = 0.364 ÷ 10⁻⁶ = 364,000 Pa. The pressure is the difference, about 2,241,516 Pa or 22.12 atm. The ideal gas law would predict 2,494,339 Pa (24.62 atm), roughly 11% too high.
Volume at atmospheric pressure. For the same gas at 1 atm and 300 K, the ideal-gas volume is 24.617 L. Solving the cubic gives 24.514 L, a little smaller because attraction between the molecules outweighs their size at this pressure.
Moles. Take 24.5 L of the same gas at 1 atm and 27 °C (300.15 K). The ideal gas law gives n = PV ÷ (RT) ≈ 0.9947 mol, while the van der Waals equation gives about 0.9989 mol: attraction between the molecules lowers the pressure they exert, so slightly more gas is needed to reach 1 atm.
Temperature. With 1 mol in 24.5 L at 1 atm and the same constants, T = (P + a n² ÷ V²)(V − nb) ÷ (nR) ≈ 299.84 K, or 26.69 °C.
Constants for common gases
Rounded literature values. Divide a by 10 to convert from the common tabulation in L²·bar/mol² to Pa·m⁶/mol²; b is given here in litres per mole (enter it with the L/mol unit).
| Gas | a (Pa·m⁶/mol²) | b (L/mol) | Critical T (K) |
|---|---|---|---|
| Helium | 0.00346 | 0.0238 | 5.2 |
| Hydrogen | 0.02476 | 0.0266 | 33.2 |
| Nitrogen | 0.137 | 0.0387 | 126.2 |
| Oxygen | 0.1382 | 0.0319 | 154.4 |
| Argon | 0.1355 | 0.0320 | 150.9 |
| Methane | 0.2283 | 0.0428 | 190.1 |
| Carbon dioxide | 0.364 | 0.0427 | 303.8 |
| Water vapour | 0.5536 | 0.0305 | 646.8 |
Where the equation applies and where it fails
The van der Waals equation is a large improvement over the ideal gas law for moderately dense gases, and it captures the existence of a critical point. It is still a two-parameter model, so quantitative accuracy is limited.
- At low pressure and high temperature the gas is nearly ideal, and the correction terms become negligible.
- Below the critical temperature the equation has three real volumes for some pressures, which represent liquid, gas and an unstable state in between. The model describes the shape of the transition but not where it happens.
- At very high density the molecules are better described by more detailed equations such as Redlich-Kwong, Peng-Robinson or virial expansions.
- Mixtures need mixing rules for a and b, which are not part of this calculator.
For gases that behave ideally, the ideal gas law calculator is the simpler choice. Comparing the two results is a quick way to judge how far a given gas deviates from ideal behaviour.
Frequently asked questions
What do the constants a and b mean?
The constant a reflects attraction between molecules and lowers the pressure; the constant b is the volume one mole of molecules excludes and raises the pressure. Each gas has its own pair of values.
When should I use van der Waals instead of the ideal gas law?
Use it when the pressure is high, the temperature is low, or the gas is near condensation, where the ideal gas law drifts noticeably from reality. At normal room conditions the two agree closely.
How does the calculator solve for volume or moles when the equation is cubic?
It solves the cubic numerically and returns the gas-like root: the largest volume, or the smallest amount of substance. Below the critical temperature the equation can have two more roots that describe liquid-like and unstable states, which are not reported.
Which temperature scale should I use?
Any of the five offered. They are converted to kelvin internally. The equation itself requires absolute temperature, so a value of 0 on the Celsius scale means 273.15 K.
References
- Atkins, P. and de Paula, J., Physical Chemistry (Oxford University Press), chapter on real gases
- CRC Handbook of Chemistry and Physics, table of van der Waals constants (CRC Press)
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Van der Waals Calculator. Reeliy. https://reeliy.com/calculators/van-der-waals-equation-calculator“Van der Waals Calculator.” Reeliy, 2026, https://reeliy.com/calculators/van-der-waals-equation-calculator.