On this page
- What each letter means
- Choosing R (the part everyone gets stuck on)
- Temperature must be in kelvin
- Worked example 1: find the volume
- Worked example 2: find the pressure
- Worked example 3: find the moles (and mass)
- Worked example 4: find the molar mass of an unknown gas
- Where the law comes from
- When gases aren’t ideal
- Quick answers
- Calculate it
A bicycle pump gets warm when you use it. A sealed bag of crisps puffs up on a flight. A car tyre looks flatter on a cold morning. Each of these everyday observations is the same equation playing out:
PV = nRT
The ideal gas law connects four measurable properties of a gas, so that knowing any three lets you calculate the fourth.
What each letter means
| Symbol | Quantity | Common units |
|---|---|---|
| P | Pressure | atm, kPa, Pa, mmHg, bar |
| V | Volume | L, mL, m³ |
| n | Amount of gas | mol |
| R | Gas constant | depends on the units above |
| T | Absolute temperature | K only |
Choosing R (the part everyone gets stuck on)
R is a single physical constant, but its numerical value depends on which units you use for pressure and volume:
- 0.082 06 L·atm/(mol·K) — pressure in atm, volume in litres
- 8.314 J/(mol·K) — SI units: pressure in Pa, volume in m³. Also equal to 8.314 L·kPa/(mol·K), which is very convenient.
- 62.36 L·mmHg/(mol·K) — pressure in mmHg or torr, volume in litres
The rule: pick the R whose units match your data, or convert your data to match your R. Most wrong answers in gas problems are unit mismatches, not algebra mistakes.
Temperature must be in kelvin
Always add 273.15 to a Celsius temperature before using it. The gas laws describe proportionality to absolute temperature. At 0 °C a gas still has plenty of volume — plugging in T = 0 would say it has none. Doubling from 10 °C to 20 °C doesn’t double anything; in kelvin it’s a change from 283 K to 293 K, only about 3.5%.
Worked example 1: find the volume
What volume does 1.00 mol of gas occupy at 0 °C and 1.00 atm?
V = nRT ÷ P = (1.00 × 0.082 06 × 273.15) ÷ 1.00 = 22.4 L
This is the famous molar volume at 0 °C and 1 atm. Note that IUPAC’s current definition of STP uses 100 kPa rather than 1 atm, which gives 22.7 L instead — see STP and molar volume for why textbooks disagree.
Worked example 2: find the pressure
A 2.50 L steel cylinder holds 0.400 mol of nitrogen at 25 °C. What is the pressure?
T = 25 + 273.15 = 298.15 K
P = nRT ÷ V = (0.400 × 0.082 06 × 298.15) ÷ 2.50 = 3.91 atm
Worked example 3: find the moles (and mass)
How many grams of CO₂ are in a 500 mL flask at 101.3 kPa and 20 °C?
Using R = 8.314 L·kPa/(mol·K):
n = PV ÷ RT = (101.3 × 0.500) ÷ (8.314 × 293.15) = 0.020 78 mol
Mass = 0.020 78 mol × 44.01 g/mol = 0.915 g
Worked example 4: find the molar mass of an unknown gas
Rearranging PV = nRT with n = mass ÷ molar mass gives a way to identify a gas:
M = mRT ÷ PV
1.25 g of a gas occupies 1.00 L at 1.00 atm and 27 °C. What is its molar mass?
M = (1.25 × 0.082 06 × 300.15) ÷ (1.00 × 1.00) = 30.8 g/mol
That’s close to 30, consistent with nitric oxide (NO, 30.01) or ethane (C₂H₆, 30.07). Further tests would tell them apart.
Where the law comes from
The ideal gas law combines older, simpler laws that each hold one pair of variables fixed:
- Boyle’s law: at constant temperature, P ∝ 1/V.
- Charles’s law: at constant pressure, V ∝ T.
- Gay-Lussac’s law: at constant volume, P ∝ T.
- Avogadro’s law: at constant P and T, V ∝ n.
We cover each of those, with the combined gas law, in Boyle’s, Charles’s and Gay-Lussac’s laws.
When gases aren’t ideal
An “ideal” gas is a model that assumes two things: the gas molecules take up no space themselves, and they don’t attract each other. Both are close enough to true for most gases at everyday conditions, where molecules are far apart and moving fast.
The model breaks down:
- At high pressure, where molecules are squeezed close enough that their own volume matters.
- At low temperature, especially near the point where the gas would condense, because attractive forces start to matter.
- For “sticky” molecules with strong intermolecular forces, like water vapour or ammonia.
For those situations chemists use corrections such as the van der Waals equation. For homework problems and most lab work at room conditions, PV = nRT is accurate to within a few percent or better.
Quick answers
Does the type of gas matter in PV = nRT? No — that’s the remarkable part. At the same P and T, a mole of hydrogen and a mole of xenon occupy almost the same volume. Only the molar mass differs, which matters when you convert to grams.
What is R in simple terms? A proportionality constant that links the energy of a gas (PV has units of energy) to its temperature and amount.
Why is my answer negative? You almost certainly used a Celsius temperature below zero. Convert to kelvin.
Calculate it
The ideal gas law calculator solves for any variable and lets you pick units separately for pressure, volume and temperature, so you never need to choose an R value. It also has a combined gas law mode.
Advertisement