Skip to content
Omnikalc

Ideal gas law calculator: PV = nRT for pressure, volume, moles or temperature

Solve the ideal gas law for any one of pressure, volume, amount or temperature, in the units you use, with the mass and density of the gas.

Updated on
Your inputs

Value out of range

Value out of range

mol

Value out of range

Temperature unit

Value out of range

Results

Volume

22.414

Pressure

1.0000

Ideal gas law applies well

Amount of gas

1.0000 mol

Temperature (kelvin)
273.15 K
Temperature (°C)
0.00 °C
Mass of gas
28.970
Density of the gas
1.292

Results at other temperatures

VolumeDensity of the gas
-20 current20.7731.395
0 current22.4141.292
20 current24.0551.204
25 current24.4651.184
37 current25.4501.138
100 current30.6200.946

One law for all gases

At ordinary temperatures and pressures, most gases behave in the same simple way: their pressure, volume, amount and temperature are tied together by the ideal gas law, PV = nRT. Know three of them and you can find the fourth. It works for air in a tire, helium in a balloon or carbon dioxide in a soda bottle.

The formula

  • PV = nRT
  • P: pressure, V: volume, n: amount in moles, T: absolute temperature in kelvin
  • R = 8.314 J/(mol·K) = 0.08206 L·atm/(mol·K)
  • T (K) = T (°C) + 273.15
  • Mass of gas = n × molar mass; density ρ = P × M ÷ (R × T)

The calculator converts atm, kPa, bar, psi, mmHg, liters, milliliters and cubic feet for you.

Worked example: molar volume

What volume does 1 mole of gas take at 0 °C and 1 atm?

  1. T = 0 + 273.15 = 273.15 K.
  2. V = nRT ÷ P = 1 × 0.08206 × 273.15 ÷ 1 = 22.41 L.
  3. For air (28.97 g/mol), that volume weighs 28.97 g, a density of 1.29 kg/m³.

At 20 °C the same mole takes 24.05 L, and at body temperature (37 °C) about 25.4 L.

Worked example: a helium balloon

A party balloon holds about 10 L of helium at 20 °C and 1 atm.

  1. n = PV ÷ RT = 1 × 10 ÷ (0.08206 × 293.15) = 0.416 mol.
  2. Mass of helium: 0.416 × 4.0026 = 1.66 g.
  3. The same volume of air weighs about 12 g, so the balloon can lift roughly 10 g, minus the weight of the rubber.
Law Held constant Relationship
Boyle’s law n, T P1V1 = P2V2
Charles’s law n, P V1 ÷ T1 = V2 ÷ T2
Gay-Lussac’s law n, V P1 ÷ T1 = P2 ÷ T2
Avogadro’s law P, T V ÷ n is constant

Each is a special case of PV = nRT.

When the law breaks down

  • High pressure: above about 10 atm, the volume of the molecules themselves and their attractions matter. A scuba tank at 200 atm holds a few percent less air than the ideal law predicts.
  • Low temperature: near the boiling point, gases condense and stop behaving ideally.
  • Steam and polar gases such as ammonia deviate more than helium or nitrogen.

For those cases, chemists use real-gas equations such as van der Waals.

Common mistakes

  • Using °C or °F directly: always convert to kelvin.
  • Mixing units for R: use 0.08206 with liters and atm, 8.314 with cubic meters and pascals.
  • Forgetting that gauge pressure (tire gauges) excludes the 14.7 psi of the atmosphere: add it to get absolute pressure.

Frequently asked questions

What is the ideal gas law?

PV = nRT: pressure × volume = moles × gas constant × absolute temperature. R = 8.314 J/(mol·K), or 0.08206 L·atm/(mol·K).

What volume does one mole of gas occupy?

22.41 L at 0 °C and 1 atm, and about 24.05 L at 20 °C and 1 atm. The value is nearly the same for any gas that behaves ideally.

Why must temperature be in kelvin?

The law uses absolute temperature, which starts at absolute zero. Add 273.15 to degrees Celsius; using °C or °F directly gives wrong or even negative volumes.

When does the ideal gas law not work?

At high pressure, above roughly 10 atm, and at low temperature near condensation, molecules interact and take up space. Real-gas equations such as van der Waals are then more accurate.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.