The Ideal Gas Law

One equation, four variables, endless problems solved: PV = nRT.

High schoolIntro Gen ChemUni Year 1
โฑ๏ธ About 20 min

The gas laws each hold something fixed and compare a 'before' with an 'after'. But what if you just want to know how many moles of gas are in a tank right now, given its pressure, volume and temperature? For that you need a single equation that ties all four together at once โ€” and it is one of the most useful lines in all of chemistry.

๐Ÿ’ก
The big idea: The ideal gas law, PV = nRT, links pressure, volume, amount and absolute temperature through one constant R. It contains Boyle's, Charles's, Gay-Lussac's and Avogadro's laws all at once, and describes real gases well under everyday conditions.
๐ŸŽฏ By the end, you'll be able to
  • State the ideal gas law and identify each variable and its units
  • Use R = 0.08206 L*atm*mol^-1*K^-1 with matching units
  • Rearrange PV = nRT to solve for P, V, n or T
  • Connect the ideal gas law back to the individual gas laws
๐Ÿ“Ž Helpful to know first

One equation to rule them all

The four gas laws each described a proportionality: V with 1/P, V with T, P with T, V with n. Stitch them together and you get a single relationship between all four quantities, joined by one proportionality constant called the ideal gas constant, R.

\[ PV = nRT \]
The ideal gas law. P = pressure, V = volume, n = moles of gas, T = absolute temperature (kelvin), R = ideal gas constant.
๐Ÿ”‘ Match your units to R
The value of R depends on the units you use. The common pairing is R = 0.08206 L·atm·mol−1·K−1. That fixes the units of everything else: pressure in atm, volume in litres, amount in moles, and temperature in kelvin. Convert every quantity into these units before you plug in.
\[ R = 0.08206\ \dfrac{\text{L}\cdot\text{atm}}{\text{mol}\cdot\text{K}} \]
The value used throughout this lesson. (If pressure is in kPa and volume in litres, R = 8.314 J*mol^-1*K^-1 instead.)
โœจ It contains the other laws
Hold n and T fixed and PV = nRT becomes PV = constant — that's Boyle. Hold n and P fixed and V/T = nR/P = constant — that's Charles. Hold n and V fixed and P/T = nR/V = constant — that's Gay-Lussac. The ideal gas law isn't a new fact; it's all of them in one line.

Worked strategy

Almost every ideal-gas problem is the same three steps: (1) convert units (temperature to kelvin, pressure to atm, volume to litres), (2) rearrange PV = nRT for the unknown, (3) substitute and compute. Let's see it.

๐Ÿ“ Worked example: How many moles of gas are in a 5.0 L container at 2.0 atm and 400 K?
  1. Units are already good: V = 5.0 L, P = 2.0 atm, T = 400 K.
  2. Rearrange for n: n = PV / (RT).
  3. n = (2.0 atm × 5.0 L) / (0.08206 × 400) = 10 / 32.82.
  4. = 0.30 mol.
โœ“ About 0.30 mol of gas.
๐Ÿ“ Worked example: What volume does 1.00 mol of an ideal gas occupy at 0 C (273.15 K) and 1.00 atm?
  1. This is STP. Solve for V: V = nRT / P.
  2. V = (1.00 × 0.08206 × 273.15) / 1.00.
  3. = 22.4 L. This is the molar volume at STP you may have seen quoted as 22.4 L/mol.
โœ“ 22.4 L โ€” the molar volume of an ideal gas at STP.
โœ๏ธ Practice: A 2.0 L flask holds gas at 1.0 atm and 273.15 K. How many moles are present? (Use R = 0.08206.)
mol
Solution
  1. n = PV / (RT).
  2. n = (1.0 atm × 2.0 L) / (0.08206 × 273.15) = 2.0 / 22.41.
  3. = 0.089 mol. (Consistent with 22.4 L per mole: 2.0 L is about one-eleventh of that.)
โœ๏ธ Practice: 0.50 mol of gas is held in a 10.0 L container at 300 K. What is the pressure (in atm)? (Use R = 0.08206.)
atm
Solution
  1. P = nRT / V.
  2. P = (0.50 mol × 0.08206 × 300 K) / 10.0 L = 12.31 / 10.0.
  3. = 1.23 atm.
โš ๏ธ When 'ideal' breaks down
The ideal gas law assumes particles have no volume and no attractions โ€” the KMT picture. That's excellent at ordinary and low pressures and high temperatures. But at very high pressure (particles crowded) or very low temperature (attractions matter, gas near condensing), real gases drift from PV = nRT. For high-school and first-year problems, ideal is almost always the right call.
๐ŸŽฎ Interactive: Gas Law Sandbox LIVE
Predict first: If you halve the volume at constant temperature, what happens to the pressure?

An interactive gas simulation with sliders for amount, temperature and volume; pressure is computed from PV=nRT and a particle box shows count, speed and spacing.

Adjust amount (n), temperature (T) and volume (V) โ€” pressure follows PV = nRT while the particle box shows why: more particles or faster particles or a smaller box all mean more wall collisions, and more pressure.

Check your understanding

1. In PV = nRT with R = 0.08206 L*atm/(mol*K), which set of units is correct?
That value of R demands pressure in atm, volume in litres, amount in moles and temperature in kelvin. Mixing in Celsius or millilitres gives a wrong answer.
2. You double the absolute temperature of a fixed amount of gas at constant volume. The pressure...
From PV = nRT with V and n fixed, P is proportional to T. Doubling the kelvin temperature doubles the pressure.
3. Under which conditions does a real gas behave MOST like an ideal gas?
Low pressure keeps particles far apart (their own volume is negligible) and high temperature makes weak attractions unimportant โ€” exactly the ideal assumptions.
โœ… Key takeaways
  • The ideal gas law is PV = nRT, linking pressure, volume, moles and absolute temperature.
  • With R = 0.08206 L*atm*mol^-1*K^-1, use atm, litres, moles and kelvin.
  • Rearrange for the unknown: n = PV/RT, P = nRT/V, V = nRT/P, T = PV/nR.
  • It contains Boyle's, Charles's, Gay-Lussac's and Avogadro's laws as special cases.
  • One mole of ideal gas occupies about 22.4 L at STP (0 C, 1 atm).
โžก๏ธ Gases are only one state of matter. Cool a gas enough and it condenses; cool further and it freezes. Next we map exactly when matter switches states โ€” and read the phase diagram that charts every transition.
Want to test yourself on this? Try the Chemistry practice test โ†’