How the ideal gas law works
The ideal gas law connects the pressure, volume, temperature and amount of a gas in a single equation. It is a very good approximation for real gases under everyday conditions, and it is one of the most used formulas in chemistry. This calculator solves for the number of moles from the other three.
The formula
PV = nRT, where P is pressure, V is volume, n is moles, T is temperature in kelvin, and R is the gas constant (0.0821 L atm per mol per kelvin here). So n = PV / RT.
Worked example
One mole of gas at standard conditions (1 atm, 273.15 K) takes up about 22.4 litres, which is why those numbers return almost exactly 1 mole.
Frequently asked questions
What is the ideal gas law?
PV = nRT. It relates pressure, volume, moles and temperature of a gas through the gas constant R.
Why must temperature be in kelvin?
Gas laws use absolute temperature. Convert Celsius to kelvin by adding 273.15, so 25 C is 298.15 K.
What value of R does this use?
0.0821 litre-atmospheres per mole per kelvin, which matches pressure in atmospheres and volume in litres.