Skip to content
MoneyDeck

Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature

Updated · Free, no signup

mol
g/mol

Air ≈ 28.97, N₂ 28.01, O₂ 32.00, CO₂ 44.01, He 4.003.

Answer

V = 24.465 L

Pressure

101.325 kPa

Pressure

1 atm

Volume

24.4654 L

Amount of gas

1 mol

Temperature

298.15 K

Temperature

25 °C

Mass of gas

28.97 g

Gas density

1.18412 g/L

  • Molar volume at these conditions: 24.465 L/mol.

About the Ideal Gas Law Calculator

This ideal gas law calculator solves PV = nRT for whichever variable you need — pressure, volume, amount of gas in moles, or temperature. Enter the other three in the units you have (kPa, atm, bar, psi or mmHg; litres, millilitres, m³ or ft³; kelvin, Celsius or Fahrenheit) and it converts everything to SI internally so you never have to pick the right value of R.

Chemistry and physics students use it for gas law problems, and it is handy in the lab and workshop for estimating how much gas a cylinder holds, how pressure rises when a sealed container is heated, or the molar volume at a given temperature. The result is also shown in the other common units, along with the gas density if you enter a molar mass.

Real gases follow the ideal gas law closely at low pressures and temperatures well above their boiling points. At high pressure or near condensation, intermolecular forces matter and a real-gas equation such as van der Waals is more accurate.

How to use the ideal gas law calculator

  1. 1Choose the variable to solve for.
  2. 2Enter the three known values and pick a unit for each.
  3. 3Use absolute pressure, not gauge pressure (add about 1 atm to a tyre-gauge reading).
  4. 4Optionally enter the gas’s molar mass to get its mass and density.
  5. 5Read the answer and the conversions to other units.

Formula and method

P × V = n × R × T R = 8.314462618 J/(mol·K)

The ideal gas law links the pressure, volume, amount and absolute temperature of a gas. The calculator converts pressure to pascals, volume to cubic metres and temperature to kelvin, uses the exact SI gas constant R = 8.314462618 J/(mol·K), and rearranges the equation: P = nRT/V, V = nRT/P, n = PV/RT or T = PV/nR.

Temperature must always be absolute (kelvin): °C + 273.15. If you enter a molar mass, the mass of gas is n × M and the density is mass ÷ volume, which is the same as PM ÷ RT. In other units R is 0.082057 L·atm/(mol·K) or 62.364 L·mmHg/(mol·K).

P
Absolute pressure (Pa)
V
Volume (m³)
n
Amount of gas (mol)
R
Molar gas constant, 8.314462618 J/(mol·K)
T
Absolute temperature (K)

Worked examples

Volume of 1 mol of air at 25 °C and 1 atm

V = nRT/P = 1 × 8.314 × 298.15 ÷ 101,325 Pa = 0.02447 m³, or 24.47 L. With air’s molar mass of 28.97 g/mol the density is about 1.184 g/L.

Pressure of 2 mol in a 10 L tank at 300 K

P = nRT/V = 2 × 8.314 × 300 ÷ 0.010 m³ = 498,868 Pa, or about 499 kPa (4.92 atm).

Moles of helium in a 50 L balloon

n = PV/RT = 101,325 × 0.05 ÷ (8.314 × 293.15) = 2.08 mol. At 4.003 g/mol that is about 8.3 g of helium.

Frequently asked questions

What is the ideal gas law?+

The ideal gas law, PV = nRT, relates pressure (P), volume (V), amount of gas in moles (n) and absolute temperature (T) through the gas constant R. It combines Boyle’s, Charles’s and Avogadro’s laws.

What value of R should I use?+

Use R = 8.314 J/(mol·K) with pascals and cubic metres, 0.08206 L·atm/(mol·K) with litres and atmospheres, or 62.36 L·mmHg/(mol·K) with millimetres of mercury. This calculator converts units automatically.

Why must temperature be in kelvin?+

The gas law depends on absolute temperature, which is zero at absolute zero. Celsius and Fahrenheit have arbitrary zeros, so using them directly gives wrong or even negative volumes.

What is the molar volume of an ideal gas?+

At 0 °C and 1 atm (STP) one mole occupies 22.414 L. At 0 °C and 1 bar (IUPAC STP) it is 22.711 L, and at 25 °C and 1 atm it is about 24.47 L.

When does the ideal gas law not work well?+

It becomes inaccurate at high pressures and low temperatures, especially near the point where the gas condenses, because real molecules have volume and attract one another.

Related tools