Skip to main content

Van der Waals Equation Calculator

Solve the Van der Waals equation for the pressure, volume, temperature or amount of a real gas, or find a gas's critical constants. Every result is compared with the ideal gas law and comes with a labeled isotherm, a chart of the two corrections, and every step with your numbers substituted. Pick a gas from the list or enter your own a and b, in the units you prefer.

Background

The ideal gas law treats molecules as points that never attract each other. Real molecules take up room and pull on their neighbors. Van der Waals fixed the ideal gas law with two corrections: the volume available to the gas is reduced by n·b, and the pressure is increased by a·(n/V)² to account for attractions that make the measured pressure lower than it would otherwise be. The result, (P + a·n²/V²)(V − n·b) = n·R·T, describes gases well at moderate pressures and even predicts the critical point where gas and liquid become one fluid.

Set up your calculation

Step 1 — What do you want to find?

Pick a task below.

Step 2 — Choose the gas

typing in a or b switches the gas to Custom

choosing a gas refills a and b in these units; custom numbers are not converted

attraction between molecules; zero or more

volume taken up by one mole of molecules; zero or more

Step 3 — Enter the conditions

The quantity you are solving for only needs its unit chosen.

moles of gas; greater than 0

must be above absolute zero

must be larger than n·b

greater than 0

Below the critical temperature the equation can have up to three real volumes. All of them are listed in the result.

Learning options

Result

No result yet. Enter your numbers above and click Calculate.

How to use this calculator

  • Choose Pressure when you know the amount, volume and temperature. This is the simplest case because the equation gives P directly.
  • Choose Volume when you know the amount, pressure and temperature. The equation becomes a cubic in V, and the calculator lists every real root and tells you which is gas-like, liquid-like or unstable.
  • Choose Temperature or Amount (n) to solve for those instead. Amount is also a cubic and the root closest to the ideal-gas answer is used.
  • Choose Critical Point to get Tc, Pc and Vc from a and b alone.
  • Pick a gas or type your own a and b, choose your units (temperature in °C, K or °F; pressure in atm, bar, kPa, Pa, psi or mmHg; volume in L, m³ or mL), then click Calculate to see the result, a callout explaining it, two labeled diagrams and every step.

How the Van der Waals model works

1

The ideal gas law, PV = nRT, assumes molecules are points with no forces between them. That works well when the gas is thin and hot, and fails when it is compressed or cold.

2

Real molecules have size. Each mole occupies about b litres that other molecules cannot enter, so the room the gas actually moves in is V − nb, not V. This raises the pressure compared with the ideal gas.

3

Real molecules also attract each other. A molecule about to hit the wall is pulled back by its neighbors, so it hits more softly. The pressure drops by a(n/V)², which depends on the square of the density because it counts pairs of molecules.

4

Putting both together gives P = nRT/(V − nb) − a(n/V)². The compressibility factor Z = PV/nRT measures the overall result: Z below 1 means attraction wins, Z above 1 means size wins, and Z = 1 is an ideal gas.

5

At moderate pressure and low temperature attraction usually wins (Z < 1). At very high pressure the molecules are packed together and size wins (Z > 1). Above the Boyle temperature TB = a/(Rb), size already wins at low pressure.

6

Solving for V or n turns the equation into a cubic. A cubic can have three real roots. Above the critical temperature there is just one, but below it there can be three: a small liquid-like volume, a large gas-like volume, and a middle one that is physically unstable.

7

The critical point is where the three roots merge into one. There the isotherm has zero slope and zero curvature, which gives Vc = 3b, Pc = a/(27b²) and Tc = 8a/(27Rb). In these reduced units every Van der Waals gas follows the same curve.

8

The model is a good teaching tool and a decent estimate, not an exact one. It is least accurate for dense, liquid-like states and close to condensation, where real gases need more constants or other equations of state.

Formulas & Equations Used

Van der Waals equation: (P + a n²/V²)(V − n b) = n R T

Pressure: P = n R T / (V − n b) − a (n/V)²

Temperature: T = (P + a n²/V²)(V − n b) / (n R)

Volume (cubic in V): P V³ − (n b P + n R T) V² + a n² V − a b n³ = 0

Amount (cubic in n): (a b / V²) n³ − (a / V) n² + (P b + R T) n − P V = 0

Ideal-gas comparison: P = n R T / V,   Z = P V / (n R T)

Critical constants: T_c = 8a / (27 R b),   P_c = a / (27 b²),   V_c = 3b,   Z_c = 3/8

Boyle temperature: T_B = a / (R b)

Constants used: R = 0.082057366 L·atm·mol⁻¹·K⁻¹; 1 atm = 101 325 Pa; T(K) = T(°C) + 273.15

Example Problems & Step-by-Step Solutions

Example 1 — Pressure of CO₂

1.00 mol of CO₂ in 24.0 L at 25 °C (298.15 K), with a = 3.658 L²·atm·mol⁻² and b = 0.04286 L·mol⁻¹.

Step: nb = 0.04286 L, so V − nb = 23.957 L. Size term nRT/(V − nb) = 24.465 ÷ 23.957 = 1.0212 atm. Attraction term a(n/V)² = 3.658 × (1/24)² = 0.00635 atm.

Result: P = 1.0212 − 0.0064 = 1.0149 atm, versus 1.0194 atm for an ideal gas (0.44% lower, Z = 0.9956).

Example 2 — Volume of CO₂

1.00 mol of CO₂ at 1.00 atm and 25 °C, same a and b.

Step: The ideal volume is nRT/P = 24.465 L. The cubic 1·V³ − 24.508·V² + 3.658·V − 0.15678 = 0 has one real root above nb.

Result: V = 24.358 L, about 0.44% below the ideal volume. Attraction wins, so the real gas takes up slightly less room.

Example 3 — A compressed gas

5.00 mol of N₂ in 2.00 L at 300 K (a = 1.370, b = 0.03870).

Step: nb = 0.1935 L. Size term = 123.08 ÷ 1.8065 = 68.135 atm. Attraction term = 1.370 × (2.5)² = 8.5625 atm.

Result: P = 59.57 atm, versus 61.54 atm ideal (3.2% lower, Z = 0.968). Here the attraction term is much bigger than in Example 1 because the gas is far denser.

Example 4 — Three roots below Tc

1.00 mol of CO₂ at 20 °C (293.15 K) and 60 atm. For CO₂, Tc = 308.2 K from this model.

Step: The temperature is below Tc, so the cubic in V can have three real roots.

Result: V = 0.0885 L (liquid-like), 0.1325 L (unstable, not physical) and 0.2227 L (gas-like). The calculator uses the gas-like one by default and lets you pick the liquid-like one.

Example 5 — Temperature

2.00 mol of CO₂ in 10.0 L at 20.0 atm.

Step: a(n/V)² = 3.658 × 0.04 = 0.1463 atm, so P + a(n/V)² = 20.146 atm. V − nb = 10 − 0.08572 = 9.914 L. T = 20.146 × 9.914 ÷ (2 × 0.082057).

Result: T = 1217.05 K (943.9 °C), compared with 1218.66 K from the ideal gas law.

Example 6 — Critical point of water

Water vapor with a = 5.537 L²·atm·mol⁻² and b = 0.03049 L·mol⁻¹.

Step: Tc = 8a/(27Rb) = 44.296 ÷ 0.067552. Pc = a/(27b²) = 5.537 ÷ 0.025100. Vc = 3b.

Result: Tc = 655.7 K (382.6 °C), Pc = 220.6 atm, Vc = 0.0915 L/mol. Measured values are about 647 K and 218 atm, so the model is close for water's temperature and pressure.

Example 7 — Amount of gas in a tank

How much N₂ fills a 5.00 L tank at 100 atm and 300 K?

Step: The ideal answer is PV/RT = 500 ÷ 24.617 = 20.31 mol. The Van der Waals cubic in n has one physical root.

Result: n = 21.15 mol, about 4.1% more than the ideal gas law predicts, because the attraction between molecules lets more of them fit at this pressure.

Example 8 — SI units

2.00 mol of ethane at 500 kPa and 30 °C, volume in m³ (a = 5.562, b = 0.06380).

Step: 500 kPa = 4.934 atm and 30 °C = 303.15 K. The ideal volume is 10.082 L.

Result: V = 9.754 L = 0.009754 m³, about 3.3% below ideal. Choose m³ in the volume unit box and the calculator does the conversion.

Frequently Asked Questions

What do a and b mean?

The constant a measures how strongly molecules attract each other: stickier molecules such as water and ammonia have large a. The constant b is the volume per mole that the molecules themselves take up: bigger molecules have bigger b.

Why can I get three volumes?

Below the critical temperature the Van der Waals isotherm has an S-shaped loop, so one pressure can match three volumes. The smallest is liquid-like, the largest is gas-like, and the middle one is unstable. At the critical temperature and above, there is one root.

Which units should a and b be in?

Choose whichever matches your data table in the “Units for a and b” box: L²·atm·mol⁻² with L·mol⁻¹, L²·bar·mol⁻² with L·mol⁻¹, or Pa·m⁶·mol⁻² with m³·mol⁻¹. The calculator converts internally. Changing the box does not convert numbers you typed, so re-enter them or pick a gas again.

Why do other sources list different a and b?

The constants are fitted to experiments, and different fits, temperature ranges and edition updates give slightly different values. This calculator uses a standard handbook-style table, and you can overwrite any value with your own.

Can I enter temperature in °C or °F?

Yes. Choose the unit next to the temperature box. The calculator converts to kelvin (K = °C + 273.15) and rejects temperatures at or below absolute zero.

What does Z mean?

Z = PV/nRT is the compressibility factor. An ideal gas has Z = 1. If Z is below 1, attraction between molecules dominates and the gas is easier to compress than ideal. If Z is above 1, molecular size dominates and it is harder to compress.

Why is Zc always 0.375?

Substituting Tc, Pc and Vc into PV/RT makes a and b cancel, leaving exactly 3/8. Real gases have Zc near 0.27 to 0.29, which shows the model is qualitative close to the critical point.

Why do I see a warning about negative pressure?

For a cold, dense gas the equation can give P < 0. That describes a stretched fluid that is not stable, and in practice the substance would have condensed. Treat the number as a sign the gas is outside the model's range.

Does it handle liquid–gas coexistence?

No. It shows all mathematical roots and labels them, but it does not apply the Maxwell equal-area construction that locates the true boiling pressure. The calculator warns you when your temperature is below Tc.

Does it work for gas mixtures?

Only for a single gas. For a mixture you would need mixing rules for a and b, which are not included here.

Back to all calculatorsAll calculators