One Equation That Describes Almost Every Gas You'll Encounter

The ideal gas law, PV = nRT, relates four measurable properties of a gas in a single equation. In words: pressure times volume equals moles times the gas constant times temperature. From this equation, if you know three of the four variables (P, V, n, T), you can calculate the fourth.

The law is called "ideal" because it makes simplifying assumptions: gas molecules have no volume, no intermolecular forces, and elastic collisions. Real gases deviate from these assumptions at high pressures and low temperatures — but at ordinary conditions (atmospheric pressure, room temperature), most common gases behave nearly ideally, making this equation accurate to within 1–5%.

The Variables and Units

P — Pressure The force gas exerts on its container walls per unit area. Common units:

  • Atmospheres (atm): 1 atm = standard atmospheric pressure at sea level
  • Kilopascals (kPa): 1 atm = 101.325 kPa
  • Millimeters of mercury (mmHg or Torr): 1 atm = 760 mmHg
  • Pounds per square inch (psi): 1 atm = 14.696 psi

V — Volume The space the gas occupies. Common units:

  • Liters (L): most common in chemistry (1 L = 0.001 m³)
  • Cubic meters (m³): SI unit (1 m³ = 1000 L)

n — Amount of substance Moles of gas. One mole contains 6.022 × 10²³ molecules (Avogadro's number). To convert mass to moles: n = mass(g) / molar mass(g/mol).

R — Ideal Gas Constant The proportionality constant that ties together units:

  • R = 0.08206 L·atm/(mol·K) — use when pressure is in atm and volume in liters
  • R = 8.314 J/(mol·K) — use for energy calculations or SI units
  • R = 8.314 L·kPa/(mol·K) — use when pressure is in kPa

T — Temperature Must always be in Kelvin (absolute temperature). K = °C + 273.15. Room temperature (25°C) = 298.15 K. Never plug Celsius into the ideal gas law.

Solving PV = nRT: Four Worked Problems

Problem 1: Find the Pressure

2 moles of nitrogen gas are in a 10.0 L container at 300 K (27°C). What is the pressure?

Solve for P: P = nRT/V

P = (2 mol × 0.08206 L·atm/mol·K × 300 K) / 10.0 L P = (49.24 L·atm) / 10.0 L P = 4.92 atm

That's about 72.3 psi or 498 kPa — roughly 5 times atmospheric pressure.

Problem 2: Find the Volume

What volume does 0.500 moles of helium gas occupy at 25°C and 1.00 atm?

Convert temperature: T = 25 + 273.15 = 298.15 K

Solve for V: V = nRT/P

V = (0.500 mol × 0.08206 L·atm/mol·K × 298.15 K) / 1.00 atm V = 12.23 L·atm / 1.00 atm V = 12.2 L

Note: 1 mole of any ideal gas at STP (0°C, 1 atm) occupies 22.4 L. At 25°C (the more common "room temperature" reference), 1 mole occupies 24.5 L. Our 0.5 moles at 25°C giving 12.2 L checks out (12.2 = 24.5 / 2).

Problem 3: Find the Moles (and Mass)

A sealed container holds nitrogen gas at 2.00 atm and 22°C in a 5.00 L volume. How many grams of nitrogen are present?

Convert temperature: T = 22 + 273.15 = 295.15 K

Solve for n: n = PV/RT

n = (2.00 atm × 5.00 L) / (0.08206 L·atm/mol·K × 295.15 K) n = 10.00 / 24.21 n = 0.413 mol

Convert to grams: Molar mass of N₂ = 28.02 g/mol mass = 0.413 mol × 28.02 g/mol = 11.6 g of nitrogen gas

Problem 4: Find the Temperature

A gas sample has 0.100 mol in a 2.50 L container at 4.92 atm. What is the temperature in Celsius?

Solve for T: T = PV/(nR)

T = (4.92 atm × 2.50 L) / (0.100 mol × 0.08206 L·atm/mol·K) T = 12.30 / 0.008206 T = 1499 K

Convert to Celsius: °C = 1499 - 273.15 = 1226°C

This would be an extremely hot gas — the conditions inside a furnace or combustion engine.

The Combined Gas Law and Special Cases

When the amount of gas (n) is constant, the ideal gas law reduces to simpler relationships:

Boyle's Law (constant n, T): PV = constant, so P₁V₁ = P₂V₂

  • Doubling volume halves pressure; halving volume doubles pressure.
  • Example: A 2.0 L balloon at 1.0 atm is compressed to 0.5 L. New pressure = (1.0 × 2.0) / 0.5 = 4.0 atm

Charles's Law (constant n, P): V/T = constant, so V₁/T₁ = V₂/T₂

  • Temperature and volume are directly proportional.
  • Example: A 3.0 L gas at 300 K is heated to 450 K. New volume = 3.0 × (450/300) = 4.5 L

Gay-Lussac's Law (constant n, V): P/T = constant, so P₁/T₁ = P₂/T₂

  • Real application: A car tire at 30°C (303 K) has pressure 32 psi. After driving (60°C, 333 K), new pressure = 32 × (333/303) = 35.2 psi — this is why tire pressure increases when tires warm up.

Combined Gas Law (constant n only): P₁V₁/T₁ = P₂V₂/T₂ Use when two of P, V, T change simultaneously.

When the Ideal Gas Law Fails

The ideal gas law assumes no intermolecular forces and zero molecular volume. Real gases deviate significantly when:

High pressure (above ~10 atm): At high pressure, molecules are forced close together, and the volume of the molecules themselves becomes significant (remember, we assumed it was zero). The Van der Waals equation corrects for this.

Low temperature: Near the boiling point of a gas, intermolecular attractive forces become significant, pulling molecules together and reducing pressure below ideal predictions.

Gases with strong intermolecular forces: CO₂, SO₂, and NH₃ deviate more from ideal behavior than noble gases or H₂, which have very weak intermolecular forces.

Rule of thumb: For problems at atmospheric pressure and above 0°C, the ideal gas law is accurate within 1–2% for most gases. At higher pressures (20+ atm) or for gases near their condensation point, use the Van der Waals equation or experimental data.

Molar Mass from Ideal Gas Law

A useful application: determining the molar mass of an unknown gas.

Setup: Measure P, V, T, and the mass (m) of a gas sample. Formula: M = mRT/(PV), where M is molar mass in g/mol and m is mass in grams.

Example: A 1.56 g sample of an unknown gas at 25°C, 1.00 atm occupies 0.860 L. M = (1.56 g × 0.08206 × 298.15) / (1.00 × 0.860) M = 38.1 / 0.860 = 44.3 g/mol

Likely identity: carbon dioxide (CO₂ = 44.01 g/mol) or propane (C₃H₈ = 44.10 g/mol). Further analysis (combustion test, reaction with base) would distinguish them.

Ideal Gas Law Calculator

Solve for pressure, volume, moles, or temperature using the ideal gas law

Try this tool →