The ideal gas law is a single equation that relates the pressure, volume, temperature, and amount of a gas: PV = nRT. To use it, you plug in any three of those four variables (along with the gas constant R) and solve for the unknown. The key to getting it right every time is matching your units before you calculate.
What Each Variable Means
The equation PV = nRT contains five terms:
- P is pressure, the force the gas exerts on its container walls.
- V is volume, the space the gas occupies.
- n is the number of moles, which tells you how much gas you have.
- R is the universal gas constant, a fixed number that bridges the other variables together.
- T is the absolute temperature, measured in Kelvin.
R has different numerical values depending on which units you use for pressure and volume. The two most common versions are 0.08206 L·atm/(mol·K) when pressure is in atmospheres and volume is in liters, and 8.314 J/(mol·K) when pressure is in pascals and volume is in cubic meters. Pick the value of R that matches your units, and everything else falls into place.
Step-by-Step Problem Solving
Every ideal gas law problem follows the same workflow, regardless of which variable you’re solving for.
Step 1: List What You Know
Write down every given value and identify the unknown. For example, you might know the pressure, temperature, and number of moles, and need to find the volume.
Step 2: Convert Units
This is where most mistakes happen. Before touching the equation, make sure every value is in the same unit system as your chosen R constant. The three conversions you’ll do most often:
- Temperature to Kelvin: Add 273.15 to any Celsius temperature. If you’re given 35°C, that becomes 308 K. You must use Kelvin because the equation breaks down at 0°C (it would predict zero pressure or volume, which is physically impossible). Kelvin starts at absolute zero, the point where molecular motion stops entirely.
- Pressure to matching units: If you’re using R = 0.08206, you need atmospheres. Convert mmHg by dividing by 760. Convert kPa by dividing by 101.325. Convert bar by dividing by 1.01325.
- Volume to matching units: If using R = 0.08206, you need liters. If using R = 8.314, you need cubic meters. One cubic meter equals 1,000 liters, so divide liters by 1,000 to get cubic meters. Getting this conversion wrong will throw your answer off by a factor of a thousand.
If you’re given a mass of gas instead of moles, convert it by dividing the mass in grams by the molar mass. For instance, 5.0 grams of neon divided by its molar mass of about 20.18 g/mol gives you roughly 0.25 mol.
Step 3: Rearrange and Solve
Isolate the unknown variable algebraically before plugging in numbers. The rearrangements you’ll use most:
- Solving for volume: V = nRT / P
- Solving for pressure: P = nRT / V
- Solving for temperature: T = PV / nR
- Solving for moles: n = PV / RT
Plug in your converted values, and check that units cancel properly. If you set up R = 0.08206 L·atm/(mol·K), the mol and K in the numerator should cancel with the mol and K in the denominator of R, leaving you with liters (for volume) or atmospheres (for pressure).
A Worked Example
Suppose you have 5.0 grams of neon gas at 256 mmHg and 35°C, and you need to find the volume.
First, convert everything. Pressure: 256 mmHg ÷ 760 = 0.337 atm. Moles: 5.0 g ÷ 20.18 g/mol = 0.25 mol. Temperature: 35 + 273 = 308 K. Now use R = 0.08206 L·atm/(mol·K).
V = (0.25 mol × 0.08206 × 308 K) / 0.337 atm = about 18.8 liters. Every unit cancels except liters, confirming the answer makes sense.
Standard Temperature and Pressure
Many problems state that a gas is “at STP.” The current IUPAC definition sets standard temperature at 273.15 K (0°C) and standard pressure at 100,000 Pa (1 bar). Older textbooks sometimes use 1 atm (101,325 Pa) as the standard pressure, so check which convention your course follows. At STP, one mole of an ideal gas occupies about 22.7 liters under the newer definition, or 22.4 liters under the older one.
Common Mistakes to Avoid
The math itself is straightforward. Nearly every error comes from unit problems.
The single most common mistake is using Celsius instead of Kelvin. A temperature of 25°C plugged directly into PV = nRT gives a wildly wrong answer. Always add 273.
The second most common mistake is mismatching pressure or volume units with R. If you use R = 0.08206 but enter pressure in kPa, your answer will be off by orders of magnitude. Before calculating, confirm that the units on every value line up with the units embedded in your R constant.
Volume is a particularly easy place to slip up when working in SI units. If R = 8.314 J/(mol·K), volumes must be in cubic meters. A volume of 500 cm³ is not 0.5 m³. It’s 0.0005 m³ (divide by one million). Getting this wrong inflates or deflates your answer by a factor of a thousand or more.
A Real-World Application
The ideal gas law isn’t just a classroom exercise. In medicine, it’s used to calculate how long a portable oxygen tank will last. A standard “E” cylinder holds 4.7 liters of gas compressed to 137 bar. Using PV = nRT (and recognizing that temperature stays roughly constant as gas leaves the tank), you can simplify to P₁V₁ = P₂V₂. Solving gives (137 bar × 4.7 L) / 1.01 bar = about 637 liters of usable oxygen at room pressure. At a delivery rate of 15 liters per minute, that full tank lasts roughly 42 minutes, a critical number when planning patient transport.
When the Equation Stops Working
The ideal gas law assumes two things that aren’t perfectly true for real gases. First, it treats gas molecules as infinitely tiny points that take up no space. Second, it assumes molecules don’t attract or repel each other at all. Under everyday conditions (moderate temperatures, low to moderate pressures), these simplifications are close enough that the equation gives accurate results.
The equation starts to break down in two situations. At very high pressures (above about 10 MPa, or 100 atmospheres), gas molecules are squeezed so close together that their physical size matters. The actual volume of the molecules becomes a meaningful fraction of the container’s volume, and attractions between molecules begin pulling them together more than the equation predicts. At very low temperatures (approaching or below 0°C for some gases), molecules slow down enough that those same intermolecular attractions become significant, eventually causing the gas to condense into a liquid, something the ideal gas law can’t account for at all.
For conditions where the ideal gas law falls short, a modified version called the Van der Waals equation adds two correction terms: one that subtracts the volume occupied by the molecules themselves, and another that accounts for intermolecular attraction. The tradeoff is that these correction factors are different for every gas, so you lose the elegant universality of PV = nRT. For most problems you’ll encounter in a general chemistry or physics course, the ideal gas law is accurate enough.

