MolDraw › Chemistry tools › Ideal Gas Law Calculator

Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for pressure, volume, moles or temperature in any units (atm, kPa, mmHg, psi, L, mL, °C, °F, K). Enter grams and a formula to convert to moles automatically. Switch to the combined, Boyle, Charles or Gay-Lussac law for before-and-after problems.

Quick answer: PV = nRT with R = 0.08206 L·atm mol⁻¹ K⁻¹. One mole of gas at 0 °C and 1 atm occupies 22.41 L. Always convert temperature to kelvin (°C + 273.15).

PV = nRT. Leave the value you want to find blank.

Gas law formulas

LawEquationHeld constant
Ideal gas lawPV = nRT—
Combined gas lawP₁V₁/T₁ = P₂V₂/T₂n
Boyle's lawP₁V₁ = P₂V₂T, n
Charles's lawV₁/T₁ = V₂/T₂P, n
Gay-Lussac's lawP₁/T₁ = P₂/T₂V, n
Avogadro's lawV₁/n₁ = V₂/n₂P, T

Values of the gas constant R

8.314 J mol⁻¹ K⁻¹(= 8.314 Pa·m³ mol⁻¹ K⁻¹ = 8.314 kPa·L mol⁻¹ K⁻¹)
0.08206 L·atm mol⁻¹ K⁻¹use with atm and litres
62.36 L·torr mol⁻¹ K⁻¹use with mmHg/torr and litres

Always use kelvin: T(K) = T(°C) + 273.15. At STP (0 °C, 1 atm) one mole of an ideal gas takes up 22.414 L. At IUPAC STP (0 °C, 100 kPa) it takes up 22.711 L.

Worked examples

Pressure of CO₂

22 g CO₂ (0.500 mol) in 5.00 L at 25 °C: P = nRT/V = 0.500 × 0.08206 × 298.15 / 5.00

P = 2.45 atm

Boyle's law

6.0 L of gas at 1.0 atm is compressed to 3.0 atm at constant T: V₂ = P₁V₁/P₂

V₂ = 2.0 L

Charles's law

2.00 L at 25 °C heated to 100 °C: V₂ = 2.00 × 373.15/298.15

V₂ = 2.50 L

Combined gas law

500 mL at 101.3 kPa, 20 °C goes to 85 kPa, 5 °C: V₂ = 500 × (101.3/85) × (278.15/293.15)

V₂ = 565 mL

Drawing structures for your notes? MolDraw is a free online chemical structure editor for molecules, reactions and lab diagrams.

Open MolDraw editor

Frequently asked questions

What is the ideal gas law?

PV = nRT links pressure P, volume V, amount n (mol) and temperature T (kelvin) of an ideal gas, where R = 8.314 J mol⁻¹ K⁻¹ = 0.08206 L·atm mol⁻¹ K⁻¹. If you know any three, you can find the fourth.

Which value of R should I use?

Match R to your units: 0.08206 for atm and L, 8.314 for kPa and L (or Pa and m³), 62.36 for mmHg and L. This calculator converts units for you, so you can mix them.

Why must temperature be in kelvin?

Gas laws are proportional to absolute temperature. Using °C gives wrong answers, and even division by zero at 0 °C. Add 273.15 to convert °C to K.

What is the combined gas law?

P₁V₁/T₁ = P₂V₂/T₂ for a fixed amount of gas. Boyle's (constant T), Charles's (constant P) and Gay-Lussac's (constant V) laws are special cases.

What is the molar volume of a gas at STP?

22.414 L/mol at 0 °C and 1 atm, or 22.711 L/mol at the IUPAC standard of 0 °C and 100 kPa. At 25 °C and 1 atm it is 24.47 L/mol.

When does the ideal gas law fail?

At high pressure or low temperature, where the volume of the molecules and the attractions between them matter. Real gases then follow equations such as van der Waals.

Related chemistry tools