School · Chemistry · Intermediate

Ideal gas law calculator

PV = nRT, solved for whichever quantity you leave blank. Pick the unit set your syllabus uses and the right gas constant comes with it, because using the wrong R is the most common way to get this wrong.

R is the same physical constant each time. Only the units change, so the number changes with them. Match this to your data sheet.
Leave exactly one blank. Temperature must be in kelvin: add 273.15 to a Celsius value.

What the equation is saying

PV = nRT ties together everything about a gas in one line. Pressure times volume equals the number of moles, times the gas constant, times temperature in kelvin. If you change one quantity, the equation tells you exactly how the others must respond.

It is worth seeing that the older gas laws are all just this equation with something held fixed. Boyle's law is PV = constant, which is what you get when n and T do not change. Charles's law is V ÷ T = constant, which is the same equation with P and n fixed. You do not need to memorise them separately once you have this one.

Two things cost more marks here than anything else. First, temperature must be in kelvin, never Celsius, because the equation depends on absolute temperature. Second, R has to match your units: use 0.08206 with litres and atmospheres, 8.314 with pascals and cubic metres. Mixing them silently gives an answer that is wrong by a factor of thousands.

Where the "ideal" part breaks down

The equation assumes gas particles have no volume of their own and no forces between them. That is close enough for most gases at everyday pressures and temperatures, which is why it works so well in school problems.

It gets less accurate at very high pressure, where particles are squeezed close enough that their own volume matters, and at very low temperature, where they are moving slowly enough for attractions between them to have an effect. Near the point where a gas is about to condense into a liquid, the ideal gas law stops being a good description at all.

Common questions

Which value of R should I use?
Whichever matches your units. R = 8.314 J/(mol·K) works with pascals and cubic metres. R = 0.08206 L·atm/(mol·K) works with litres and atmospheres. R = 8.314 L·kPa/(mol·K) works with litres and kilopascals. They are the same constant expressed three ways.
Why must temperature be in kelvin?
Because the equation says volume is proportional to temperature, and that only holds from absolute zero. At 0°C a gas still has volume, so Celsius would make the maths give nonsense. Kelvin starts at absolute zero, so the proportionality works. Convert with K = °C + 273.15.
Can I use this to find molar mass?
Yes, and it is a common exam question. Find n from PV = nRT, then divide the sample's mass in grams by n. That gives grams per mole.
What is the difference between this and the combined gas law?
The combined gas law, P₁V₁/T₁ = P₂V₂/T₂, compares the same gas under two sets of conditions and needs no value of R. Use PV = nRT when you want an absolute quantity such as how many moles are present.