n = PV / RT
Start from PV = nRT and divide both sides by whatever is sitting next to n. Everything else stays where it is. Moles is the one people solve for most, because it is the bridge to grams.
Worked example
A 2.50 L flask holds a gas at 1.00 atm and 298 K. How many moles are in it?
Why the rearrangement works
PV = nRT is one equation with four variables and a constant, so knowing any three gives you the fourth. To isolate n, divide both sides by everything that shares its side of the equals sign. Nothing else moves, and no term changes sign, because there is no addition anywhere in the equation. That is why all four rearrangements look so similar.
The same problem in different units
The same flask in SI units: 101325 Pa, 0.00250 m3, 298 K, using R = 8.314 J/mol·K.
Identical to the first answer, because the units and R changed together. That is the whole trick: match R to your units and the physics takes care of itself.
Which R to use
R only looks like several different constants because it carries units. Pick the one that matches the units you already have, and do not convert anything afterwards.
| R | Units | Use when |
|---|---|---|
| 0.08206 | L·atm / mol·K | pressure in atm, volume in litres |
| 8.314 | J / mol·K | pressure in pascals, volume in cubic metres |
| 62.36 | L·mmHg / mol·K | pressure in mmHg or torr |
Where this goes wrong
Temperature must be in kelvin. Celsius is the single most common reason an ideal gas answer comes out wrong, and it is silent: the arithmetic still works, the number is just false. Add 273.15.
R has to match your units. Using 0.08206 with pressure in kilopascals gives an answer that is out by a factor of about a hundred.
Volume in litres, not millilitres, when you are using 0.08206. A 250 mL flask is 0.250 L.
Practice
Answers are underneath each one. Use R = 0.08206 and keep temperature in kelvin.
- How many moles fill a 500 mL flask at 2.00 atm and 273 K?
0.0446 mol - A 22.4 L vessel at 1.00 atm and 273.15 K holds how many moles?
0.999 mol
The other rearrangements
- V = nRT / P, for volume
- P = nRT / V, for pressure
- T = PV / nR, for temperature
Or use the ideal gas law calculator, which solves for whichever one you leave blank and shows the working.