How to use the ideal gas law calculator
- Choose the quantity to solve for: pressure, volume, amount in moles or temperature.
- Enter the other three values and pick their units. The calculator hides the field you are solving for.
- Use absolute pressure, not gauge pressure, and remember that temperature in Celsius or Fahrenheit is converted to kelvin first.
- Read the answer in the unit you chose, with other common units and each conversion step shown.
Formula
PV = nRT
R = 8.314462618 J/(mol K)
P in pascals, V in cubic meters, n in moles, T in kelvin
1 atm = 101,325 Pa, 1 L = 0.001 m3, K = C + 273.15
R is the exact value of the universal gas constant, from the 2019 SI definitions. Other units are converted to pascals, cubic meters and kelvin, then back.
Worked example
One mole of an ideal gas at 1 atm and 0 degrees C (273.15 K) occupies V = nRT / P = 1 x 8.314462618 x 273.15 / 101,325 = 0.02241397 m3, or 22.41397 liters.
Two moles in a 10 liter container at 25 degrees C give a pressure of 495.791406 kPa. And 1 mol at 1 atm in exactly 22.4 L is at about -0.1702 degrees C.
When the ideal gas law works
The law treats gas molecules as points that do not attract each other. That is a good model for gases at ordinary pressures and temperatures well above their boiling point, such as air at room conditions. At high pressure, or close to the condensation point, real gases deviate and equations such as van der Waals are better.
Absolute pressure and temperature
Gauge pressure is measured against the atmosphere, so add about one atmosphere to a gauge reading to get absolute pressure. Temperature must be absolute too, which is why the tool converts to kelvin. A temperature at or below absolute zero is rejected.
Related tools
For humidity and dew point use the dew point calculator. For other unit changes use the unit converter, and for powers of ten see the scientific notation converter.
Assumptions and limits
- The gas behaves ideally. Real gases at high pressure or low temperature differ.
- R is 8.314462618 J/(mol K). Pressure is absolute.
- Unit factors are exact or standard: 1 atm is 101,325 Pa, 1 US gallon is 231 cubic inches, and 1 psi is 6,894.757293168 Pa.
- The mmHg unit uses the conventional 133.322387417 Pa per mmHg.
Frequently asked questions
What is the ideal gas law formula?
PV = nRT, where P is pressure, V is volume, n is the amount of gas in moles, R is the gas constant and T is absolute temperature.
What value of R should I use?
It depends on units. In SI units R is 8.314462618 J/(mol K). This tool converts everything to SI first, so the value stays the same for any units you pick.
Why must temperature be in kelvin?
The law is proportional to absolute temperature. Zero degrees Celsius is not zero energy, so Celsius values would give wrong answers.
How many liters does one mole of gas take?
About 22.414 liters at 0 degrees C and 1 atm. At 25 degrees C and 1 atm it is about 24.47 liters.