Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature in any common unit, with molar volume and gas density.

The Ideal Gas Law Calculator runs entirely in your browser. Pressures, volumes and temperatures you enter never leave your device.

Open the Molarity Calculator

About Ideal Gas Law Calculator

Ideal Gas Law Calculator solves PV = nRT for whichever of the four quantities you do not know. Pick the unknown and the other three fields stay editable, each with its own unit menu — pressure in pascals, kilopascals, bar, atmospheres, mmHg or psi; volume in litres, millilitres, cubic metres, cubic centimetres or cubic feet; temperature in kelvin, Celsius or Fahrenheit. Everything is converted to SI internally before the equation is solved and converted back afterwards, because the gas constant only takes a fixed numeric value once the unit system is settled. Temperature must be absolute, so a value at or below zero kelvin is rejected with an explanation rather than returning a meaningless answer.

Features

How to use the Ideal Gas Law Calculator

  1. Choose which quantity you are solving for
  2. Fill in the other three values, picking the unit each is quoted in
  3. Read the answer in the unit you selected, and the SI value alongside
  4. Optionally add a molar mass to get the gas density

Example

Input

1 mol, 1 atm, 0 °C — solve for volume

Output

22.41 L (0.02241 m³), molar volume 22.41 L/mol

The familiar molar volume at 1 atm and 0 °C; at the modern 100 kPa standard it is 22.71 L.

Common errors & troubleshooting

Frequently asked questions

What is the value of R in the ideal gas law?
8.314462618 joules per mole per kelvin in SI units, which has been exact since the 2019 redefinition. In other unit systems it takes different values — 0.08206 L·atm per mole per kelvin is the common alternative.
Why must temperature be in kelvin for PV = nRT?
Because the law relates pressure and volume to absolute thermal energy. Celsius has an arbitrary zero, so using it makes the ratios meaningless and can even produce negative or infinite results at ordinary temperatures.
What is the molar volume of an ideal gas?
22.71 litres per mole at the current standard temperature and pressure of 0 °C and 100 kPa, or 22.41 litres per mole at the older 1 atm definition. It scales directly with temperature and inversely with pressure.
When does the ideal gas law stop being accurate?
When molecules are close enough to interact — at high pressure, at low temperature, and near the point where the gas condenses. Under ordinary laboratory conditions most gases follow it to within a percent or two.
Are the values I enter sent anywhere?
No. Every conversion and calculation happens in your browser, with nothing transmitted or stored.

Related tools

All ArrayKit tools