Materials · gases

Ideal Gas

Squeeze, heat and add to a gas and watch the molecules; solve P V = n R T for whichever of the four you do not know, in any units; see the speeds of the molecules and why light ones escape; and see where a real gas stops behaving like the ideal one.
pressure
—

The gas in the box

P V = n R T
The essentials

The gas laws

P V = n R T

How fast the molecules go

Where a real gas is not ideal

How it works

A gas is molecules hitting a wall, and everything follows from that

Pressure is molecules hitting a wall

Squeeze a gas to half the volume and the same molecules hit the wall twice as often, so the pressure doubles (Boyle). Heat it and they hit harder and more often, so a sealed gas’s pressure goes up in proportion to its absolute temperature: 20 °C to 50 °C is a 10 percent rise, not 150.

A mole of any gas is the same size

At the same pressure and temperature a mole of any ideal gas fills the same volume: 22.41 litres at 0 °C and 1 atmosphere, 24.06 at 20 °C, whether it is hydrogen or sulfur hexafluoride, because the molecules are so far apart that their size and their kind do not matter.

Light molecules are fast

At one temperature every molecule has the same average kinetic energy, so the lighter it is the faster it goes: at 20 °C hydrogen at 1,905 m/s, helium 1,352, nitrogen 511, carbon dioxide 408 (root-mean-square). A helium balloon leaks 2.6 times as fast as a nitrogen one.

Real gases are almost ideal

The ideal gas law ignores the size of the molecules and the pull between them. At 10 atmospheres and 20 °C, nitrogen is within 0.7 percent of it and carbon dioxide 4.5 percent below; at 200 atmospheres carbon dioxide is far from it (Z = 0.56).

The root-mean-square speed of the molecules of twelve gases at 20 °C, in metres a second. Every one of these molecules has the same average kinetic energy; the speed is set by the mass alone, so hydrogen is 3.7 times as fast as nitrogen and sulfur hexafluoride less than half as fast.
Field notes

What you are looking at

24.06litres per mole

One mole, 20 °C, 1 atm

The volume of a mole of any ideal gas is RT/P: 22.41 litres at 0 °C and 1 atm (101.325 kPa), 24.06 at 20 °C, 24.79 at 25 °C and 1 bar (100 kPa), and 22.71 at the IUPAC standard of 0 °C and 1 bar. A litre of gas at room conditions is about 0.04 mol, which is the quick way to find a mass: 0.04 times the molar mass.

The three laws are one

Boyle (PV constant at a fixed temperature), Charles (V/T constant at a fixed pressure) and Gay-Lussac (P/T constant at a fixed volume) are PV = nRT with one thing held still, and Avogadro (equal volumes of gas hold equal numbers of molecules) is the n. Halving the volume of 24 litres of gas at 1 atm leaves it at 2 atm; heating a closed tyre from 20 to 50 °C raises its absolute pressure by 10.2 percent.

Why kelvin

The laws are in proportions, and a proportion needs a true zero. The volume of a gas at a fixed pressure falls in a straight line with temperature and, drawn back, would reach nothing at −273.15 °C: that is absolute zero, 0 K. Doubling the temperature means doubling the kelvin: 20 °C is 293 K, so twice that is 586 K or 313 °C, not 40 °C. Real gases liquefy before they get there.

Density and lift

The density of a gas is PM/RT. At 20 °C and 1 atm that is 1.165 kg/m³ for nitrogen (air is about the same, 1.2), 0.166 for helium, 0.084 for hydrogen and 1.83 for carbon dioxide, which is why a helium balloon lifts about 1.0 kg for every cubic metre and carbon dioxide pools on the floor of a pit.

Pressure from the molecules

Take the walls’ view. Each molecule that hits a wall and bounces back gives it a push, and the pressure is the total push per area per second: P = (1/3)(N/V)m⟨v2⟩. Setting that equal to nRT/V says the average kinetic energy of a molecule is (3/2)kBT, which is 0.0379 eV at 20 °C, the same for every gas. The tool computes the pressure both ways and they agree.

The speeds

Molecules do not all go at the average. The Maxwell–Boltzmann distribution is lopsided, with the most probable speed under the mean, which is under the root-mean-square: for nitrogen at 20 °C they are 417, 471 and 511 m/s. About 1.1 percent of nitrogen molecules at 300 K are faster than 1,000 m/s, which is what lets a small share of a liquid’s or a gas’s molecules react or escape long before the average one could.

Escaping the Earth

The speed needed to leave the Earth is 11.2 km/s, about 6 times the root-mean-square speed of hydrogen at 300 K (1.9 km/s), so almost nothing gets away at once: the share of hydrogen molecules faster than that is about 9×10−22. But the upper atmosphere is hotter than that and the share is not zero, so over geological time light gases leak away (the Earth has almost no free hydrogen or helium) and heavy ones stay.

Leaking through a hole

The rate at which a gas goes through a very small hole goes as 1/√M (Graham’s law of effusion), because the lighter molecules arrive at the hole more often. Helium leaks out of a balloon 2.65 times as fast as nitrogen and hydrogen 3.73 times, which is why a helium balloon sinks sooner than an air one of the same size, and how uranium isotopes were once separated, one hexafluoride molecule at a time.

A real gas

The van der Waals equation corrects the ideal one with two numbers: b, the volume the molecules take up themselves, and a, the pull between them. The ratio Z = PV/nRT is 1 for an ideal gas. In this model nitrogen at 20 °C has Z = 0.993 at 10 atm and 1.006 at 200 atm, oxygen 0.990 and 0.894, and carbon dioxide, near its critical temperature of 304 K (the model gives 301), 0.955 and 0.556: the pull dominates at modest pressure and the size at high.

What this cannot do

The gas here is one pure gas, and air is treated as nitrogen (it is 78 percent nitrogen and 21 oxygen, with a molar mass of 28.96 against 28.01). The ideal gas law has no liquid in it, and the van der Waals equation only hints at one: below the critical temperature its curve loops where a real gas would condense, and near the critical point it is only qualitatively right. Water vapour, which condenses at room temperature, is not included, the molecules have no rotation or vibration energy (so no heat capacities), and the temperatures are of the gas, not of the walls.

Questions

What people ask

What is a mole of gas?

A mole is 6.022×1023 molecules, a number chosen so that a mole of a substance weighs its molecular mass in grams: 28 g of nitrogen, 32 g of oxygen, 4 g of helium. At 20 °C and 1 atm every mole of gas, whichever it is, takes up about 24 litres.

Why do the gas laws use kelvin and not Celsius?

Because the volume and pressure of a gas are in proportion to the temperature measured from absolute zero. Celsius puts zero at the freezing point of water, which is nothing special to a gas, so doubling 20 °C does not double the pressure; doubling 293 K does, which is 313 °C.

What is STP?

Standard temperature and pressure, which has meant different things. The IUPAC value is 0 °C and 100 kPa (1 bar), when a mole of gas fills 22.711 litres; the older value, 0 °C and 1 atmosphere, gives 22.414. Chemists also use 25 °C and 1 bar (24.79 litres). Always say which.

Does it matter which gas it is?

Not to the gas laws. At the same temperature and pressure a given number of molecules fills the same volume whatever they are (Avogadro). It matters for the mass (the molar mass), the speed of the molecules (light ones are faster) and, at high pressure, for how far the gas departs from the ideal.

Why does a balloon shrink in the cold?

The gas inside cools, the molecules slow down and push less hard, and the elastic skin squeezes it to a smaller volume at a pressure still close to the air’s. For a fixed pressure the volume is in proportion to the temperature in kelvin: a balloon of 4.1 litres at 20 °C is 3.6 litres in a freezer at −18 °C.

Why is the pressure in a sealed can dangerous when it is heated?

Because the volume cannot grow, so the pressure goes up in proportion to the absolute temperature: a sealed can at 1 atm and 20 °C heated to 200 °C is at 1.61 atm, and the metal is also weakened. An aerosol can is marked not to be put on a fire or in a hot car for this reason.

Why do light gases escape from a planet?

The molecules of a gas have a range of speeds, and a few go much faster than the average. In the thin upper air a molecule that is fast enough and heading outwards leaves for good. Hydrogen and helium are moving fast enough at the top of the atmosphere that they are lost over geological time; nitrogen and oxygen are not.

What is the compressibility factor?

Z = PV/nRT, the ratio of the real gas’s PV to the ideal gas’s. It is 1 for an ideal gas, below 1 where the pull between molecules makes the pressure lower than ideal, and above 1 where their size makes it higher. Engineers use it to correct the gas law for natural gas, oxygen cylinders and the like.

When is the ideal gas law wrong?

At high pressure, where the molecules are close enough to feel each other and take up room, and at low temperature near the point where the gas condenses. Near 1 atm and room temperature it is right to a fraction of a percent for the common gases; carbon dioxide at 50 atm is not a gas the equation can describe.

What is the critical temperature?

The temperature above which a gas cannot be turned into a liquid however hard it is squeezed: 126 K for nitrogen (−147 °C), 304 K for carbon dioxide (31 °C), 5 K for helium. A cylinder of nitrogen at room temperature is a gas at any pressure, but a cylinder of carbon dioxide below 31 °C is partly liquid.

Results are for reference only. The ideal gas law is exact only for molecules that do not attract or occupy space; for the common gases it is good to a fraction of a percent near 1 atm and room temperature and worse at high pressure or low temperature, where the van der Waals figures here are better but still approximate near the critical point. Do not size a pressure vessel from them: use the pressure rating and the standards for the gas.
Version history · site-wide passes only

This page has changed in 2 archived releases, but each of those was a site-wide pass, so none is attributable to this tool on its own and none is listed here. That is not a claim that the tool never changed — a release that reworked many pages at once may well have altered this one too. The changelog has them.

Rules of thumb are approximations, offered to get you to the right order of magnitude fast. Check anything load-bearing against its source or the exact tool. Privacy · Terms

© 2026 Rules of Thumb · Runs entirely in your browser