Van der Waals Equation Calculator

Real-gas pressure (atm)—
Ideal-gas pressure (atm)—
Difference from ideal (%)—

How Van der Waals Equation Calculator is calculated: Van der Waals equation: (P + a(n/V)^2) x (V - nb) = nRT. Solved for P: P = nRT/(V - nb) - a(n/V)^2. R = 0.082057 L atm / (mol K).

What is the van der Waals equation?

The ideal gas law pretends gas molecules have no size and never attract each other. Real molecules do both: they take up space, and they pull on each other. The van der Waals equation corrects for both — a constant a for the attraction, which lowers the pressure, and a constant b for the molecular volume, which raises it. The result is a pressure that matches real gases far better, especially at high pressures and low temperatures.

This calculator works out the pressure of a real gas from its moles, volume, temperature, and the gas's own a and b constants. Type the five numbers and it shows the real-gas pressure, the ideal-gas pressure for comparison, and the percentage difference between them. It is the calculation for physical chemistry problems where the ideal gas law is not good enough.

The share and print buttons sit with every tool on this site. Share sends the page link, not your numbers, so whoever opens it starts from the same defaults you saw. Print gives you a clean copy for a lab notebook, a recipe folder, or a classroom handout, with the formula and the worked example included.

Students use tools like this one for homework and exam practice, teachers use them to check answers quickly in class, and working cooks and lab staff use them because a fast, correct conversion beats doing the same arithmetic by hand for the twentieth time. The tool does not replace understanding the method — it removes the arithmetic so the understanding is what you spend your time on.

How the van der Waals equation is calculated

The method is the van der Waals equation solved for pressure: P equals nRT over (V minus nb), minus a times (n over V) squared. The first term is the ideal pressure corrected for the volume the molecules themselves occupy — the free volume is V minus nb, not V. The second term subtracts the pressure lost to intermolecular attraction, which grows with the square of the concentration.

The constants a and b are different for every gas, and they are measured, not derived: carbon dioxide has a = 3.59 and b = 0.0427, nitrogen has a = 1.39 and b = 0.0391, and hydrogen has a = 0.244 and b = 0.0266, in the units used here. The gas constant R is 0.082057 litre-atmospheres per mole-kelvin, and the temperature must be in kelvin.

The constants used on this page are the standard values taught in textbooks: the gas constant, Avogadro's number, and the atomic masses from the standard periodic table. They are stated where they are used, so you can check them against your own textbook and see that they match. If your course uses a rounded constant — 22.4 litres per mole at STP, for example — the difference from the precise value is small, and it is noted in the worked example.

The answers on this page are rounded for display, usually to two decimal places, while the maths underneath keeps full precision. That means a result shown as 2.28 may really be 2.2814, and the reverse check may differ in the last digit for the same reason. That is rounding, not an error, and it never changes the answer by more than a fraction of a percent.

The constants a and b: the inputs that matter

The input people get wrong is the constants: a and b belong to the gas in the problem, and using carbon dioxide's constants for nitrogen gives a wrong answer. The constants are usually given in the question or in a table — check them before typing, and check the units, because a and b are quoted in several unit systems and this calculator uses litre-atmospheres.

The second trap is the temperature. As with every gas law, it must be in kelvin: Celsius plus 273.15. The third is the volume: the correction is V minus nb, the free volume, and if nb is close to V — a very compressed gas — the correction dominates and the ideal pressure is far off. That is exactly the regime where the equation matters most.

The most common mistake with any calculator is typing a number and trusting it without a glance at the label beside it. The second is copying a result with more digits than the inputs justify — if your inputs are good to two digits, the answer is good to two digits, however many the screen shows. Round the answer to match the precision of what you measured.

A worked example: carbon dioxide

Take the default example: 1 mole of carbon dioxide in 10 litres at 27 degrees Celsius, with a = 3.59 and b = 0.0427. The temperature is 300.15 kelvin. The real-gas pressure is 2.438 atmospheres, while the ideal-gas pressure is 2.463 atmospheres — a difference of 1.03 percent, with the real gas lower because the attraction term wins at this volume.

Check the other test: 2 moles of nitrogen in 5 litres at 27 degrees, with a = 1.39 and b = 0.0391, gives a real-gas pressure near 9.78 atmospheres against an ideal 9.85 — a smaller difference, because nitrogen's attraction is weaker. And hydrogen in 22.4 litres at 0 degrees is almost ideal, differing by a fraction of a percent.

Before you rely on a result, run a quick sanity check on it. Convert a value you already know — one large egg should come out near 57 grams, one mole of water near 18 grams — and see that the tool agrees. If it does, your inputs are right and the rest of the answers will be too. If it does not, the input is usually the problem, not the tool.

The one habit that prevents nearly every wrong answer here is checking the units before you trust the result. Grams are not ounces, millilitres are not cups, and a value typed in the wrong unit gives a confident-looking wrong answer. Read the label next to each box, match it to the unit on your recipe or your lab sheet, and only then read the result.

Why the van der Waals equation matters

Physical chemistry students use the van der Waals equation to correct ideal-gas answers and to understand why real gases liquefy: below the critical temperature, the equation predicts a liquid and a gas in equilibrium, which the ideal gas law never does. It is the first step from ideal gases towards real ones.

Engineers use it for compressed gases, pipelines, and refrigeration, where the ideal gas law's error is large enough to matter. A gas stored at 200 atmospheres is not at the pressure the ideal gas law predicts, and a vessel designed on the ideal figure would be designed wrong — the van der Waals correction is part of the safety margin.

This site has a full set of related tools, and the links in this article point to the ones people reach for next. They all work the same way — type your numbers, read the answer, nothing uploaded — so once you know one of them, you know all of them. The "More free tools" section at the bottom of the page lists three close neighbours.

Everything on this page runs in your browser. Nothing you type is uploaded, stored, or sent to a server, and there is no account to create and no sign-up step. You can use the tool as many times as you like, close the tab, and come back later — your inputs are never saved anywhere.

Two related tools worth knowing are the Boyle's law calculator and temperature converter.

Van der Waals vs the ideal gas law

The ideal gas law, on the ideal gas law calculator, is the van der Waals equation with a and b set to zero — no molecular size, no attraction. This calculator shows both pressures side by side, so you can see exactly how much the correction matters for your conditions. At low pressures the two agree; at high pressures they do not.

A density calculator works out a gas's density from its pressure, temperature, and molar mass, which is the same ideal-gas arithmetic in a different form. If you need the density of a real gas, use the van der Waals pressure from this page as the pressure in that calculation.

This site has a full set of related tools, and the links in this article point to the ones people reach for next. They all work the same way — type your numbers, read the answer, nothing uploaded — so once you know one of them, you know all of them. The "More free tools" section at the bottom of the page lists three close neighbours.

Common mistakes with the van der Waals equation

The most common mistake is using the wrong a and b constants — the constants of a different gas, or in different units. The second is forgetting the temperature must be in kelvin. The third is squaring the wrong thing: the attraction term is a times (n over V) squared, not a times n over V squared.

A fourth mistake is using V instead of V minus nb in the first term, which drops the size correction entirely. A fifth is expecting the equation to be exact: it is an approximation, better than the ideal gas law but not exact, and it fails near the critical point, where the real behaviour is more complex than any two-constant equation.

The most common mistake with any calculator is typing a number and trusting it without a glance at the label beside it. The second is copying a result with more digits than the inputs justify — if your inputs are good to two digits, the answer is good to two digits, however many the screen shows. Round the answer to match the precision of what you measured.

How to use this van der Waals calculator

Type the moles, the volume in litres, the temperature in Celsius, and the gas's a and b constants. The real-gas pressure appears instantly, with the ideal-gas pressure and the percentage difference alongside. Change any number and the answers update at once.

Check the constants against the gas in the problem and their units — this calculator uses litre-atmospheres. If the difference from ideal is small, the ideal gas law was good enough; if it is large, the correction was worth making.

The share and print buttons sit with every tool on this site. Share sends the page link, not your numbers, so whoever opens it starts from the same defaults you saw. Print gives you a clean copy for a lab notebook, a recipe folder, or a classroom handout, with the formula and the worked example included.

Frequently Asked Questions

It is (P + a(n/V)^2) x (V - nb) = nRT, the ideal gas law corrected for molecular size (b) and intermolecular attraction (a). In the default example, carbon dioxide gives a real-gas pressure of 2.438 atm against an ideal 2.463 atm.

They are measured constants for each gas: a measures the strength of intermolecular attraction and b measures the volume occupied by the molecules. For carbon dioxide, a = 3.59 and b = 0.0427 in litre-atmosphere units.

At high pressures, where molecules occupy a significant fraction of the volume, and at low temperatures, where attraction matters more. Under ordinary laboratory conditions the ideal gas law is usually good to within a percent or two.

Yes, in outline: below the critical temperature it predicts a region where liquid and gas coexist, which the ideal gas law never does. The prediction is approximate — the equation is a useful model, not an exact description of real gases.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.