The ideal gas law is one of the fundamental equations of thermodynamics, linking four basic properties of a gas: pressure, volume, amount of substance, and temperature. The formula PV = nRT is the starting point for understanding gas behavior in chemistry, physics and engineering.
What do the variables in PV = nRT mean?
- P — the gas's pressure (in Pa, kPa or atm)
- V — the gas's volume (in m³ or liters)
- n — the amount of substance in moles (mol)
- R — the universal gas constant = 8.314 J/(mol·K) = 0.08206 L·atm/(mol·K)
- T — absolute temperature in kelvins (K = °C + 273.15)
Important: temperature MUST be in kelvins, not degrees Celsius. Mixing up units is the most common mistake when using this law.
History and conditions of applicability
The ideal gas law was formulated in the 19th century by combining Boyle's, Charles's and Gay-Lussac's laws. It describes the behavior of an ideal gas — a model in which:
- gas molecules don't interact with one another
- molecules occupy negligibly small volume
- collisions are perfectly elastic
In practice, most gases (nitrogen, oxygen, hydrogen, argon) behave almost ideally under conditions close to normal — low pressure and temperatures above the condensation point. At high pressures or low temperatures, the van der Waals equation should be used instead.
How to calculate gas pressure
Isolate P from PV = nRT:
P = nRT / V
Example: 2 moles of nitrogen in a 50 L tank at 25°C (298.15 K):
P = (2 × 8.314 × 298.15) / 0.05 = 4957.6 / 0.05 = 99,152 Pa ≈ 99.15 kPa ≈ 0.979 atm
How to calculate gas volume
Isolate V from PV = nRT:
V = nRT / P
Example: the volume of 1 mole of gas at standard conditions (T = 273.15 K, P = 101,325 Pa):
V = (1 × 8.314 × 273.15) / 101,325 = 2270.9 / 101,325 ≈ 0.02241 m³ = 22.41 L
This is the famous molar volume of a gas at standard conditions: 22.4 liters/mol.
How to calculate gas temperature
T = PV / (nR)
The result is in kelvins. Convert to Celsius: T[°C] = T[K] − 273.15.
How to calculate the amount of moles
n = PV / (RT)
Knowing a tank's pressure, volume and temperature, you can calculate how many moles of gas are inside it — and from there, the mass: m = n × M, where M is the gas's molar mass.
The component laws behind the ideal gas law
PV = nRT combines three older laws:
- Boyle's law: at constant T and n: P · V = constant (pressure and volume are inversely proportional).
- Charles's law: at constant P and n: V / T = constant (volume increases proportionally with temperature).
- Gay-Lussac's law: at constant V and n: P / T = constant (pressure increases proportionally with temperature).
Practical applications of the ideal gas law
- Car tires — tire pressure rises after driving heats the tire up (Gay-Lussac's law). That's why you should check pressure when tires are cold.
- Balloons — calculating how much helium is needed to lift a balloon of a given volume.
- Gas cylinders — how much gas remains in a cylinder at a given pressure and temperature.
- Breathing — the lungs work according to Boyle's law: the diaphragm expands the chest cavity, pressure drops, and air flows in.
- Internal combustion engines — thermodynamic calculations inside engine cylinders.
- Laboratory chemistry — collecting gases over water, stoichiometry of gas reactions.
Units — pitfalls and conversions
Unit consistency is critical when using PV = nRT:
- If R = 8.314 J/(mol·K), then P is in Pa, V in m³, T in K
- If R = 0.08206 L·atm/(mol·K), then P is in atm, V in liters, T in K
- 1 atm = 101,325 Pa = 101.325 kPa
- 1 L = 0.001 m³
Use our ideal gas calculator to calculate P, V, n or T without unit errors.
FAQ — questions about the ideal gas law
What is an ideal gas?
An ideal gas is a theoretical model in which molecules don't interact with each other and don't occupy volume. In practice, most gases under normal conditions (low temperature, low pressure) behave very similarly to an ideal gas.
Why must temperature be in kelvins?
The Kelvin scale starts at absolute zero (−273.15°C), where all thermal motion stops. The law PV=nRT describes the kinetic energy of molecules, which is proportional to absolute temperature (K), not Celsius temperature.
What's the molar volume of a gas at standard conditions?
At standard conditions (0°C = 273.15 K, 1 atm = 101,325 Pa) the molar volume of an ideal gas is 22.414 L/mol. This is a standard value used in chemistry to convert moles to gas volume.
What's the value of the gas constant R?
R = 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K) = 0.08206 L·atm/(mol·K) = 1.987 cal/(mol·K). Choose the value that matches the pressure and volume units you're using.
How do you convert kelvins to degrees Celsius?
T[K] = T[°C] + 273.15. Examples: 0°C = 273.15 K; 100°C = 373.15 K; −40°C = 233.15 K. Calculations often round this to 273.
When does the ideal gas law fail?
The law breaks down at high pressure (compressed gas, molecules close together) or low temperature (near the condensation point, where intermolecular interactions become significant). In those cases, the van der Waals equation or other real-gas models are used.
How do you calculate a gas's mass from PV=nRT?
First calculate n = PV/(RT), then m = n × M, where M is the gas's molar mass (e.g. N₂: M = 28 g/mol, O₂: M = 32 g/mol, CO₂: M = 44 g/mol).
Why does tire pressure rise in summer?
At constant tire volume and a constant amount of air (V and n fixed): P/T = nR/V = constant, so P rises proportionally with T (Gay-Lussac's law). A temperature rise from 20°C (293K) to 60°C (333K) increases pressure by about 14%.
How do you use the ideal gas law in stoichiometry?
When a chemical reaction produces or consumes gas, PV=nRT lets you convert moles of gas into its volume and back. E.g. how many liters of CO₂ form when burning 1 mole of carbon at T=25°C, P=1 atm: n=1 mol, V=nRT/P=1×0.08206×298/1≈24.5 L.
What are normal (NTP) versus standard (STP) conditions?
NTP (Normal Temperature and Pressure): 20°C (293.15 K), 1 atm — used in engineering. STP (Standard Temperature and Pressure): 0°C (273.15 K), 1 atm — the IUPAC standard until 1982. The new IUPAC standard (since 1982): 0°C, 100 kPa (molar volume = 22.711 L/mol).