Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles or temperature in any units.
About this tool
Choose which variable to solve for, then enter the other three in whatever units you have. Pressure can be in atm, kPa, Pa, bar, mmHg or psi; volume in litres, millilitres, cubic metres or cubic feet; and temperature in Celsius, kelvin or Fahrenheit. Add a molar mass to get the mass and density of the gas.
How the ideal gas law works
The ideal gas law, PV = nRT, ties together pressure P, volume V, amount n in moles and absolute temperature T, using the gas constant R = 8.314 J/(mol·K), or 0.08206 L·atm/(mol·K). It combines Boyle's law (pressure and volume are inversely related), Charles's law (volume rises with temperature) and Avogadro's law (volume rises with the number of molecules). One mole of any ideal gas at 0°C (273.15 K) and 1 atm occupies 22.41 litres; at 25°C it occupies about 24.5 litres. Temperature must be in kelvin, which is why 0°C is not zero in the equation; the calculator converts for you. With a molar mass, the mass of gas is n × M, and its density follows, which is how you can show that air, at 28.97 g/mol, is about 1.2 kg/m³ at room temperature. Honest limits: real gases deviate from ideal behaviour at high pressures and low temperatures, when molecules are close together or near condensing. For those conditions, use the van der Waals equation or published tables. The molar mass calculator gives molar masses, the temperature converter converts scales and the unit converter handles pressure and volume units.
Frequently asked questions
What is R in PV = nRT?
The gas constant: 8.314 J/(mol·K), or 0.08206 L·atm/(mol·K), depending on the units used.
What volume does one mole of gas occupy?
22.41 L at 0°C and 1 atm, and about 24.5 L at 25°C and 1 atm.
Why must temperature be in kelvin?
The law is proportional to absolute temperature; kelvin starts at absolute zero, so doubling kelvin doubles the effect.
Is my data saved?
No. The calculation runs in your browser and nothing is stored or sent.