The Ideal Gas Law PV = nRT: Units, STP and When It Fails
Where PV = nRT comes from, the exact value of R, which units to use, absolute versus gauge pressure, molar volume at different STPs, gas density, the combined gas law and real-gas limits.
· 10 min read

The ideal gas law, PV = nRT, ties together the four things you can measure about a gas: its pressure, its volume, how much of it there is and its temperature. Know three and the law gives you the fourth. It is accurate to about 1% for everyday gases near room conditions, which makes it the workhorse of chemistry labs, engineering estimates and diving tables. Most mistakes with it are not about the physics but about units: which R, which temperature scale, absolute or gauge pressure, and which "STP". This post sorts those out, with numbers you can check in the Ideal Gas Law Calculator.
The law and its pieces
P V = n R T
- P is the absolute pressure, in pascals for SI.
- V is the volume of the container, in cubic metres.
- n is the amount of gas, in moles.
- T is the absolute temperature, in kelvin.
- R is the molar gas constant.
The law grew out of three experimental results. Robert Boyle found in 1662 that at fixed temperature, pressure times volume is constant. Jacques Charles (around 1787) and Joseph Gay-Lussac (1802) found that at fixed pressure, volume is proportional to temperature, and at fixed volume, pressure is proportional to temperature. Add Avogadro's 1811 hypothesis that equal volumes of gas at the same conditions contain equal numbers of molecules, and Émile Clapeyron combined them in 1834 into the form we use.
The value of R
R is the product of two constants that were fixed exactly in the 2019 redefinition of the SI, the Avogadro constant and the Boltzmann constant:
R = N_A × k = 6.02214076 × 10²³ × 1.380649 × 10⁻²³ = 8.314462618... J/(mol·K)
So R is now an exact number. The value you need depends on the units of P and V:
| R | Units | Use with |
|---|---|---|
| 8.314462618 | J/(mol·K) = Pa·m³/(mol·K) | SI: Pa and m³ |
| 8.314462618 | kPa·L/(mol·K) | kPa and litres |
| 0.0820573661 | L·atm/(mol·K) | atm and litres |
| 0.0831446262 | L·bar/(mol·K) | bar and litres |
| 62.3636 | L·Torr/(mol·K) | Torr (mmHg) and litres |
| 10.7316 | ft³·psi/(lb-mol·°R) | US engineering units |
Choosing the wrong one is the most common error in gas problems. The calculator avoids the question entirely by converting every input to SI first and converting the answer back.
Absolute temperature and absolute pressure
The law only works with absolute scales, ones that start at true zero.
Temperature must be in kelvin (or Rankine in US engineering): K = °C + 273.15, and K = (°F − 32) × 5/9 + 273.15. Using Celsius gives nonsense: going from 10 °C to 20 °C does not double the pressure, it raises it by 293.15 ÷ 283.15, about 3.5%.
Pressure must be absolute. Most gauges, including tyre gauges and gas cylinder regulators, read gauge pressure, the pressure above the surrounding atmosphere. Add the atmospheric pressure, about 101.325 kPa (1.013 bar, 14.7 psi), before using the law. A tyre at "32 psi" is really at about 46.7 psi absolute.
Molar volume and the many STPs
Set n = 1 and solve for V and you get the volume of one mole of any ideal gas. It depends only on temperature and pressure, which is why chemists talk about "standard conditions". Unfortunately there are several:
| Convention | Temperature | Pressure | Molar volume |
|---|---|---|---|
| Old STP (pre-1982 IUPAC, many textbooks) | 0 °C | 101.325 kPa (1 atm) | 22.414 L/mol |
| IUPAC STP (since 1982) | 0 °C | 100 kPa (1 bar) | 22.711 L/mol |
| SATP | 25 °C | 100 kPa | 24.790 L/mol |
| "Room conditions" | 25 °C | 101.325 kPa | 24.465 L/mol |
| NIST / many engineering tables | 20 °C | 101.325 kPa | 24.055 L/mol |
The familiar "22.4 L" belongs to the old STP. Always state which convention you used, especially when quoting a gas flow in "standard litres per minute".
Gas density
Mass is moles times molar mass, m = n M, so density m ÷ V follows directly from the law:
ρ = P M ÷ (R T)
Dry air (M = 28.9644 g/mol) at 15 °C and 101.325 kPa comes out at 1.225 kg/m³, the sea-level density of the standard atmosphere. At 20 °C it is 1.204 kg/m³ and at 0 °C 1.292 kg/m³. Compare gases by molar mass: helium at 4.003 g/mol is about seven times less dense than air, so a balloon floats; carbon dioxide at 44.01 g/mol is 1.5 times denser, so it pools in pits and cellars, a known hazard in wineries and breweries.
Worked example: helium balloon lift
A party balloon holds 14 L at 1 atm and 20 °C. n = PV ÷ RT = 101,325 × 0.014 ÷ (8.3145 × 293.15) = 0.582 mol. That is 2.33 g of helium. The same volume of air would weigh 0.582 × 28.96 = 16.86 g, so the balloon can lift about 14.5 g minus the weight of the rubber and ribbon, which is why a small latex balloon only just floats.
Worked examples
How much air is in a scuba tank?
A 12 L cylinder is filled to 200 bar gauge at 15 °C. Absolute pressure is 201.3 bar = 2.013 × 10⁷ Pa. Then:
n = P V ÷ (R T) = 2.013 × 10⁷ × 0.012 ÷ (8.3145 × 288.15) = 100.7 mol
which is 100.7 × 28.96 = 2.92 kg of air by the ideal law. At these pressures air is a little less compressible than an ideal gas (its compressibility factor Z is about 1.03 to 1.04), so the real figure is a few percent lower, roughly 2.8 kg. Diving gas-blending tables use real-gas data for exactly this reason.
Tyre pressure on a hot day
A tyre at 2.2 bar absolute at 10 °C warms to 40 °C after a motorway drive. The volume barely changes, so with the combined gas law:
P2 = P1 × T2 ÷ T1 = 2.2 × 313.15 ÷ 283.15 = 2.433 bar absolute
The gauge reading rises from about 1.19 bar to 1.42 bar. In US units, 32 psi gauge set at 50 °F becomes about 36.6 psi gauge at 100 °F. That is why tyre makers specify pressures cold.
Gas from a reaction
Collect 50.0 mL of hydrogen over a reaction at 22 °C and 99.8 kPa (dry gas). The amount is n = 99,800 × 5.0 × 10⁻⁵ ÷ (8.3145 × 295.15) = 2.03 × 10⁻³ mol, so the reaction produced about 2.03 mmol of H₂. (If the gas was collected over water, first subtract the water vapour pressure, about 2.6 kPa at 22 °C, from the total.)
The combined gas law
For a fixed amount of gas that changes from one state to another, nR is constant, so:
P1 V1 ÷ T1 = P2 V2 ÷ T2
Hold one variable fixed and you recover the classic laws:
| Held constant | Law | Relation |
|---|---|---|
| Temperature | Boyle | P1 V1 = P2 V2 |
| Pressure | Charles | V1 ÷ T1 = V2 ÷ T2 |
| Volume | Gay-Lussac | P1 ÷ T1 = P2 ÷ T2 |
Pressures and volumes only need to be in the same units on both sides, but temperatures must still be absolute.
When the ideal gas law fails
The ideal model assumes molecules have no size and do not attract each other. Both assumptions break down when molecules are crowded together (high pressure) or moving slowly (low temperature), especially near the point where the gas would condense.
- Good: air, nitrogen, oxygen, argon, helium and hydrogen at room temperature, up to several bar, within about 1%.
- Noticeable: air at 200 to 300 bar, a few percent to around 10%.
- Poor: steam, CO₂, ammonia, propane and refrigerants near their condensation conditions, where errors can reach tens of percent.
Even at 1 atm the difference shows for heavier gases: the ideal law gives 1.830 kg/m³ for CO₂ at 20 °C, while the measured value is about 1.842 kg/m³, 0.7% higher, because CO₂ molecules attract each other enough to pack slightly closer. For better accuracy, use the compressibility factor (PV = ZnRT, with Z from tables or generalised charts) or an equation of state such as van der Waals or Peng-Robinson.
A special warning for liquefied gases: a propane or butane cylinder contains liquid with vapour above it, and its pressure is set by the temperature (the vapour pressure), not by how much is left. PV = nRT cannot tell you how full it is; weigh it instead.
Checklist
- Convert temperature to kelvin.
- Convert gauge pressure to absolute.
- Use one consistent set of units, or let the calculator convert.
- Check the answer against a known benchmark: one mole near room conditions should be about 24 L.
- Ask whether the gas is near condensation or at high pressure; if so, treat the result as approximate.
Use the calculator
The Ideal Gas Law Calculator solves for any of P, V, n and T with ten pressure units, gauge or absolute, eight volume units, four temperature scales, and amounts as moles or as a mass of a named gas, and shows density, molar volume and molecule count. Its second tab solves the combined gas law. Related tools: the Density Calculator for solids and liquids, and the Molarity Calculator and Molecular Weight Calculator for solution chemistry.
Sources
- BIPM, The International System of Units (SI Brochure), 9th edition, 2019: exact Avogadro and Boltzmann constants.
- IUPAC, Quantities, Units and Symbols in Physical Chemistry (Green Book), 3rd edition: standard conditions and molar volume.
- NIST Chemistry WebBook: thermophysical properties of air and carbon dioxide (density and compressibility).
- ISO 2533:1975, Standard Atmosphere: sea-level air density 1.225 kg/m³, molar mass of dry air 28.9644 g/mol.
- É. Clapeyron, "Mémoire sur la puissance motrice de la chaleur", Journal de l'École Polytechnique 14 (1834).
Related searches
- ideal gas law
- pv nrt units
- value of r gas constant
- molar volume at stp
- combined gas law
- gas density formula
- gauge vs absolute pressure
- when is the ideal gas law not accurate