Ideal Gas Law Calculator
Solve for pressure, volume, temperature, or moles using PV = nRT.
What Is Ideal Gas Law?
The ideal gas law combines three classical gas laws into one equation: PV = nRT, where P is pressure (Pa), V is volume (m³), n is the number of moles, R = 8.314 J/(mol·K) is the universal gas constant, and T is temperature in Kelvin (K = °C + 273.15). This equation describes the behavior of an ideal gas — one with no intermolecular forces and negligible particle volume.
The ideal gas law is derived from combining Boyle's Law (PV = constant at fixed n, T), Charles's Law (V/T = constant at fixed n, P), and Avogadro's Law (V ∝ n at fixed P, T). At standard temperature and pressure (STP: 0°C, 1 atm = 101,325 Pa), one mole of ideal gas occupies exactly 22.414 liters.
Real gases deviate from ideal behavior at high pressures (molecules are close, interactions matter) and low temperatures (kinetic energy is low relative to intermolecular forces). The Van der Waals equation (P + a/V²)(V − b) = nRT corrects for these with gas-specific constants a (attraction) and b (molecular volume). For everyday temperatures and moderate pressures, the ideal gas law provides excellent accuracy (< 1% error for many gases).
The ideal gas law is fundamental to thermodynamics, chemical engineering, meteorology, and astrophysics. It explains the compression of air in a bicycle pump (temperature rise), the expansion of hot air balloons (volume increases with temperature), scuba tank pressure changes with depth and temperature, and the behavior of stellar atmospheres.
Formula Reference Table
| Solve For | Formula | Notes |
|---|---|---|
| Ideal Gas Law | PV = nRT | R = 8.314 J/(mol·K) |
| Find P | P = nRT/V | Pa (Pascals) |
| Find V | V = nRT/P | m³ |
| Find n | n = PV/(RT) | moles |
| Find T | T = PV/(nR) | Kelvin |
| STP molar volume | V_m = 22.414 L/mol | At 0°C, 101.325 kPa |
| kPa to Pa | 1 kPa = 1,000 Pa; 1 atm = 101,325 Pa | Unit conversions |
3 Worked Examples
One mole of ideal gas at 0°C, 1 atm. Verify V = 22.4 L.
- n=1, T=273.15 K, P=101,325 Pa, R=8.314
- V = nRT/P = 1 × 8.314 × 273.15 / 101,325
- V = 2,270.9 / 101,325 = 0.02241 m³ = 22.41 L ✓
How many moles of air in a 12-L scuba tank at 200 bar (20,000,000 Pa) and 25°C?
- T = 298.15 K, V = 0.012 m³
- n = PV/(RT) = 20,000,000 × 0.012 / (8.314 × 298.15)
- n = 240,000 / 2,479 = 96.8 mol
- Mass of air ≈ 96.8 × 29 g/mol = 2,807 g = 2.8 kg
At ground (20°C = 293 K), n = 1,000 mol air, P = 101,325 Pa. Heat to 100°C (373 K). New volume?
- V₁/T₁ = V₂/T₂ (Charles's law at constant P)
- V₁ = nRT₁/P = 1000 × 8.314 × 293 / 101,325 = 24.03 m³
- V₂ = nRT₂/P = 1000 × 8.314 × 373 / 101,325 = 30.60 m³
- Volume increases 27.3% — reduces air density for lift
Real-World Applications
Common Mistakes to Avoid
PV = nRT requires T in Kelvin. T(K) = T(°C) + 273.15. Using T = 25 (meaning °C) instead of 298.15 K gives an answer 298.15/25 ≈ 11.9× too small.
R = 8.314 J/(mol·K) requires P in Pascals (Pa). 1 atm = 101,325 Pa. 1 bar = 100,000 Pa. Using atm without converting gives wrong results.
V must be in m³ when using R = 8.314. 1 liter = 0.001 m³. Forgetting to convert liters gives volume 1,000× too large.
Above ~100 atm or near the boiling point, real gas deviations become significant. Use Van der Waals or other equations of state for accurate results at extreme pressures.
n = mass/molar mass. 1 mole of N₂ (M = 28 g/mol) = 28 g. Using mass in grams instead of moles gives n 1/(molar mass) times too small.
Frequently Asked Questions
Related Physics Calculators
Formula Explorer connections
Interpretation: This formula tracks heat, temperature, work, entropy or transport in a thermodynamic system. Assumption: Use absolute temperature where required and consistent energy units. Constant properties, equilibrium, ideal gases or negligible losses may be assumed.