Gases, Liquids, Solids and Solutions

Using the Ideal Gas Law in Real Problems

A reliable method for PV = nRT problems, with worked examples on moles, molar mass, reaction volumes, tires and hot air.

Key takeaways

  • Choose R first, then convert pressure and volume to the units inside that R, and always use kelvin.
  • Rearrange the equation with symbols before substituting numbers, and carry units through to check the result.
  • Replacing n with mass divided by molar mass turns PV = nRT into formulas for density and molar mass.
  • For reactions, find moles of gas from the balanced equation, then convert moles to volume at the stated conditions.
  • The law is an excellent approximation near room conditions and a poor one at very high pressure or near condensation.

To use the ideal gas law, list what you know, convert it into units that match your value of the gas constant R, rearrange PV = nRT for the one unknown, and only then put in numbers. Most wrong answers come from unit conversions, a Celsius temperature or a gauge pressure, and very few come from the algebra.

Here P is absolute pressure, V is volume, n is the amount of gas in moles, T is temperature in kelvin and R is a constant that links them. Once you are comfortable, the same equation gives densities, molar masses and the volume of gas a reaction will release.

Pick the constant and match the units

R has one physical value, written differently depending on units.

Value of R Pressure unit Volume unit
8.314 J/(mol·K) Pa m³
8.314 L·kPa/(mol·K) kPa L
0.08314 L·bar/(mol·K) bar L
0.08206 L·atm/(mol·K) atm L

Useful conversions: 1 atm = 101.325 kPa = 1.01325 bar = 760 mmHg (very nearly 760 torr), and 1 m³ = 1000 L. Add 273.15 to a Celsius temperature to get kelvin.

You do not need all four constants. Many chemists convert everything to kPa and L and use 8.314 throughout.

A four-step routine

  1. Write down P, V, n and T with units, marking the unknown.
  2. Convert to the units of your chosen R.
  3. Solve the equation for the unknown in symbols.
  4. Substitute, cancel units and ask whether the size is believable.

A helpful benchmark for step 4: one mole of gas near room temperature and 1 atm takes up roughly 24 L. If your calculation says a small flask holds 30 mol, something slipped.

Solving a PV = nRT problem
1 List knowns P, V, n, T with units 2 Convert Kelvin, absolute pressure, units of R 3 Rearrange Isolate the unknown in symbols 4 Calculate Substitute and cancel units 5 Sanity check Compare with about 24 L per mole List knowns P, V, n, T with units 1 Convert Kelvin, absolute pressure, units of R 2 Rearrange Isolate the unknown in symbols 3 Calculate Substitute and cancel units 4 Sanity check Compare with about 24 L per mole 5

Finding the amount of gas

A 5.00 L vessel holds gas at 2.00 atm and 25 °C. How many moles are inside?

T = 25 + 273.15 = 298.15 K
n = PV ÷ RT
  = (2.00 atm × 5.00 L) ÷ (0.08206 L·atm/(mol·K) × 298.15 K)
  = 10.0 ÷ 24.47
  = 0.409 mol

The answer fits the benchmark. Five liters at double atmospheric pressure is like 10 L at 1 atm, which is a bit less than half of 24 L.

You never needed to know which gas it was. To get the mass, you would: 0.409 mol of nitrogen (28.0 g/mol) is about 11.5 g, while the same amount of helium (4.00 g/mol) is about 1.6 g.

Density and molar mass

Since n = m ÷ M, where m is mass and M is molar mass, you can rewrite the law. Dividing mass by volume gives density, ρ.

PV = (m ÷ M)RT
ρ = m ÷ V = PM ÷ RT
M = ρRT ÷ P

Suppose an unknown gas has a density of 1.80 g/L at 100.0 kPa and 298 K.

M = (1.80 g/L × 8.314 × 298 K) ÷ 100.0 kPa
  = 44.6 g/mol

This is consistent with carbon dioxide (44.0 g/mol) or propane (44.1 g/mol), allowing for experimental error. Molar mass alone cannot tell those apart. You would need another property, such as whether the gas burns, tested only under proper supervision, or an instrumental method.

Gas released by a reaction

Heating calcium carbonate strongly produces calcium oxide and carbon dioxide:

CaCO₃(s) → CaO(s) + CO₂(g)

What volume of CO₂, measured at 25 °C and 1.00 atm, comes from 5.00 g of CaCO₃ (100.09 g/mol) if it all decomposes?

moles CaCO₃ = 5.00 g ÷ 100.09 g/mol = 0.0500 mol
moles CO₂   = 0.0500 mol             (1 : 1 ratio)
V = nRT ÷ P
  = 0.04996 × 0.08206 × 298.15 ÷ 1.00
  = 1.22 L

The decomposition itself happens at a high temperature. The question asks for the volume after the gas has cooled to 25 °C, and the temperature you use must be the one at which the volume is measured. The general mole-ratio logic is covered in gas volume stoichiometry.

Pressure changes in a tire

A tire gauge reads pressure above atmospheric. Say it shows 220 kPa on a 5 °C morning, with the atmosphere at 101 kPa. What will it read when the air inside reaches 35 °C? Assume the volume and the amount of air stay fixed.

P₁ (absolute) = 220 + 101 = 321 kPa
T₁ = 278.15 K,  T₂ = 308.15 K
P₂ = 321 × (308.15 ÷ 278.15) = 356 kPa absolute
gauge reading = 356 − 101 = 255 kPa

If you had scaled the gauge value directly, you would have predicted about 244 kPa. For actual tire care, follow the vehicle maker's guidance on cold pressure.

Why hot air rises

Air is a mixture with an average molar mass of about 28.97 g/mol when dry. At 101.325 kPa and 20 °C:

ρ = PM ÷ RT
  = (101.325 × 28.97) ÷ (8.314 × 293.15)
  = 1.20 g/L

At 100 °C and the same pressure the density is about 0.95 g/L. Each cubic meter of heated air therefore weighs roughly 0.26 kg less than the cool air it displaces. A balloon needs a very large envelope because that difference, which must lift fabric, basket, fuel and people, is so modest.

The same formula shows that gases with molar mass above about 29 g/mol tend to be denser than air at equal temperature and pressure. Carbon dioxide can collect in low, poorly ventilated places, which is one reason for care with dry ice in enclosed spaces.

Solving for temperature or volume

The same routine isolates any variable. Say 0.250 mol of gas sits in a 4.00 L rigid flask and a gauge shows an absolute pressure of 180 kPa. What is the temperature?

T = PV ÷ nR
  = (180 kPa × 4.00 L) ÷ (0.250 mol × 8.314)
  = 720 ÷ 2.079
  = 346 K, or about 73 °C

Now ask what volume the same 0.250 mol would occupy at 25 °C and 100 kPa.

V = nRT ÷ P
  = 0.250 × 8.314 × 298.15 ÷ 100
  = 6.20 L

How much gas can leave a cylinder

Suppose, as a textbook exercise, a rigid 40.0 L cylinder of nitrogen reads 100 bar absolute at 20 °C. Treating it as ideal gives a first estimate of its contents.

n = PV ÷ RT
  = (100 × 40.0) ÷ (0.08314 × 293.15)
  = 164 mol

Not all of it flows out on its own. Flow stops when the inside pressure matches the surroundings, so about 40 L of gas, near 1.7 mol, stays behind. At 25 °C and 1 bar, the 162 or so mol released would fill about 4,000 L.

That figure explains why a leaking cylinder in a small room can displace a dangerous share of the air. Real cylinder work uses supplier data and trained handlers, as outlined in safe handling of compressed gases.

A two-step problem with a limiting amount

Real questions often chain the gas law to stoichiometry in both directions. Say you want to know whether 3.00 L of oxygen, measured at 25 °C and 100 kPa, is enough to burn 1.00 g of methane completely.

CH₄(g) + 2 O₂(g) → CO₂(g) + 2 H₂O(l)

moles CH₄ = 1.00 g ÷ 16.04 g/mol        = 0.0623 mol
moles O₂ needed = 2 × 0.0623            = 0.125 mol
moles O₂ on hand = PV ÷ RT
                 = (100 × 3.00) ÷ (8.314 × 298.15)
                 = 0.121 mol

The oxygen falls slightly short, so oxygen is the limiting reactant. It can burn 0.121 ÷ 2 = 0.0605 mol of methane and produce the same number of moles of carbon dioxide.

V(CO₂) = 0.0605 × 8.314 × 298.15 ÷ 100
       = 1.50 L

Notice the shortcut hiding in that result. At equal temperature and pressure, 3.00 L of oxygen gives 1.50 L of carbon dioxide, exactly the 2 : 1 ratio of the coefficients. The liquid water takes up almost no volume and is left out. This is a paper exercise: in practice, limited oxygen leads to carbon monoxide, which is why fuel-burning appliances need proper ventilation and a working alarm.

Mistakes worth checking for

  • Using 8.314 with pressure in atmospheres. The result will be off by a factor of about 101.
  • Entering milliliters where R expects liters, which makes n a thousand times too large.
  • Applying the law to a liquid or solid, such as the water formed in a combustion once it has condensed.
  • Forgetting that diatomic gases have doubled molar masses: O₂ is 32.0 g/mol, N₂ is 28.0 g/mol.
  • Rounding R or the temperature early. Keep an extra digit until the final line.

When the answer should be doubted

The ideal model assumes particles with no volume and no attractions. For common gases near room temperature and a few atmospheres, errors are usually around a percent or less, with easily condensed gases doing somewhat worse. In a full high-pressure cylinder the error can be much larger, and for a vapor near its condensing point the calculation can mislead badly. See why real gases depart from ideal behavior.

Also check whether more than one gas is present. In mixtures, the total moles give the total pressure, and each component has its own share, as described by Dalton's law of partial pressures. And if your problem only compares two states of the same sample, the shortcuts in the connected gas laws let you skip R altogether.

Common questions

Can I always use 22.4 L per mole instead?

Only at 0 °C and 1 atm. At any other temperature or pressure that figure is wrong, and PV = nRT gives the right value directly. The different standard conditions in use are compared in molar volume and standard conditions.

How many significant figures should I report?

Let your least precise measurement decide. If volume is known to three figures and temperature to the nearest degree, three figures in the answer is usually generous. State the value of R you used so that someone else can reproduce your result.

Written for 4Chemistry with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 41 articles in Gases, Liquids, Solids and Solutions →

Latest news on this topic