Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 37 · Gases and Kinetic Theory

The Ideal Gas Law

Use pV = nRT and pV = NkT to find the pressure, volume, temperature or amount of a gas, and learn when real gases behave ideally.

The three gas laws all described a fixed amount of gas. The ideal gas law includes the amount of gas as well, and joins everything in a single equation.

Moles and molecules

A mole (mol) is the amount of substance containing N_A = 6.02214076 × 10²³ particles. The molar mass M is the mass of one mole, for example about 0.0280 kg/mol for nitrogen gas (N₂) and 0.0320 kg/mol for oxygen (O₂).

If a sample has N molecules, it contains n = N / N_A moles. Its mass is m = n M.

The equation

Two equivalent forms of the ideal gas law:

p V = n R T and p V = N k_B T

  • p is pressure in Pa
  • V is volume in m³ (1 L = 10⁻³ m³)
  • n is the amount in moles
  • R = 8.314462618 J/(mol·K) is the molar gas constant
  • T is the absolute temperature in K
  • N is the number of molecules and k_B = 1.380649 × 10⁻²³ J/K

The two forms agree because R = N_A k_B.

Convert units first: pressure to Pa, volume to m³, temperature to K. The most common mistake is leaving a volume in liters or a temperature in Celsius.

Worked example 1: pressure of a gas

How much pressure does 2.0 mol of gas exert in a 10 L container at 300 K?

p = nRT/V = 2.0 × 8.314 × 300 / 0.010 ≈ 4.99 × 10⁵ Pa, about 4.9 atm.

Worked example 2: how many molecules in a liter of air?

At 273.15 K and 101,325 Pa, in 1.00 L (1.00 × 10⁻³ m³):

n = pV/(RT) = 101,325 × 1.00×10⁻³ / (8.314 × 273.15) ≈ 0.0446 mol

So the number of molecules is N = n N_A ≈ 2.69 × 10²². At these conditions, one mole occupies about 22.4 L.

Python Ideal gas calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Finding mass and density

Since n = m/M, the law becomes p V = (m/M) R T, so the density of an ideal gas is:

ρ = m / V = p M / (R T)

Air has an average molar mass of about 0.02897 kg/mol. At 101,325 Pa and 293.15 K its density is ρ = 101,325 × 0.02897/(8.314 × 293.15) ≈ 1.20 kg/m³. Warm air is less dense than cool air (larger T, smaller ρ), which is why warm air rises and hot-air balloons float.

Python Air density against temperature

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Dalton's law of partial pressures

In a mixture of ideal gases, each gas exerts the pressure it would exert alone in the same container, and the total pressure is the sum: p_total = p₁ + p₂ + .... Air is about 78% nitrogen and 21% oxygen by number of molecules, so oxygen accounts for about 21% of the atmospheric pressure, roughly 21 kPa.

When is a gas ideal?

No real gas is perfectly ideal. The ideal gas law works well when:

  • the pressure is low, so molecules are far apart and spend little time interacting, and
  • the temperature is high compared with the temperature at which the gas would condense.

At high pressure or near the boiling point, molecules attract each other and have a finite size, so real gases deviate. Corrections such as the van der Waals equation model this. For air at room conditions the ideal gas law is accurate to within a percent or so.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the pressure of 0.50 mol of an ideal gas in 5.0 × 10⁻³ m³ at 400 K? (R = 8.314 J/(mol·K))

    p = nRT/V = 0.50 × 8.314 × 400 / 5.0×10⁻³ ≈ 3.3 × 10⁵ Pa.
  2. 2. Which form of the ideal gas law uses the number of molecules N?

    pV = N k_B T is the molecular form; N k_B = n R.
  3. 3. A real gas behaves most like an ideal gas at

    At low pressure and high temperature, molecules are far apart and attractions matter little.
  4. 4. Why does a hot-air balloon rise?

    At constant pressure, ρ = pM/(RT) decreases as T increases, so the hot air gives buoyancy.

Summary

  • p V = n R T = N k_B T, with R = 8.314 J/(mol·K) and k_B = 1.381 × 10⁻²³ J/K.
  • Use SI units: Pa, m³, K and mol.
  • Gas density is ρ = p M/(R T); warm gas is less dense.
  • Real gases are close to ideal at low pressure and high temperature.

Next: Kinetic Theory: Temperature and Molecular Energy