CalcMountain

Ideal Gas Law Calculator

Use the ideal gas law (PV = nRT) to calculate pressure, volume, amount of gas, or temperature. Solve for any missing variable given the other three.

The ideal gas law — PV = nRT — is the central equation of gas-phase chemistry and physics. Four variables describe the state of a gas: pressure P, volume V, amount n (in moles), and temperature T (in Kelvin). The equation says they're not independent; pick any three and the fourth is determined. Heat a balloon and it expands. Compress a gas and it heats up. Pump more air into a tire and the pressure rises. The same single equation explains all of them.

This calculator solves PV = nRT for any of the four variables given the other three. The "ideal gas" assumption is that gas molecules don't interact with each other and have no volume of their own — a great approximation at moderate temperatures and pressures (most everyday conditions), and increasingly bad at high pressure or near a phase transition. For most homework, lab, and engineering work, the ideal gas law is accurate within a few percent.

A key insight that trips up new chemistry students: the relationships are linear (PV ∝ T at fixed n; PV/T = nR is constant for a closed system) but not separately so. Doubling temperature at constant volume doubles pressure. Doubling moles at constant T and V doubles pressure. Halving volume at constant T and n doubles pressure. The law tells you exactly how the variables trade off.

Inputs

Results

Pressure

1.000 atm

Volume

22.414 L

Moles

1.0000 mol

Ideal Gas Law Results

ParameterValue
Pressure (P)1.0000 atm
Pressure (kPa)101.33 kPa
Pressure (mmHg)760.02 mmHg
Volume (V)22.4140 L
Amount (n)1.000000 mol
Temperature (T)273.15 K
Temperature (°C)0.00 °C
R (gas constant)0.08206 L·atm/(mol·K)
Verification PV22.4147
Verification nRT22.4147
Last updated:

Formula

**Ideal gas law:** PV = nRT Where: - **P**: pressure - **V**: volume - **n**: amount in moles - **R**: ideal gas constant - **T**: absolute temperature (Kelvin) **The ideal gas constant R (in common units):** | Units of P, V | R | |---|---| | atm, L | 0.08206 L·atm/(mol·K) | | Pa, m³ | 8.314 J/(mol·K) | | kPa, L | 8.314 L·kPa/(mol·K) | | Torr, L | 62.36 L·Torr/(mol·K) | | bar, L | 0.08314 L·bar/(mol·K) | This calculator uses R = 0.08206 L·atm/(mol·K). **Solving for each variable:** - P = nRT / V - V = nRT / P - n = PV / RT - T = PV / (nR) **Standard Temperature and Pressure (STP):** - 0 °C = 273.15 K - 1 atm = 101.325 kPa - Molar volume of ideal gas at STP: **22.414 L/mol** This is one of the most-memorized numbers in chemistry. 1 mole of any ideal gas at STP occupies 22.414 L. (Note: IUPAC redefined STP in 1982 to 100 kPa, giving 22.711 L/mol. Most textbooks still use 101.325 kPa STP, so 22.414 L/mol is the answer you'll typically see.) **Combined gas law (closed system, n constant):** P₁V₁/T₁ = P₂V₂/T₂ Useful when comparing the same gas before and after a state change. **Special cases:** - **Boyle's law**: PV = const (at constant T, n) - **Charles' law**: V/T = const (at constant P, n) - **Gay-Lussac's law**: P/T = const (at constant V, n) - **Avogadro's law**: V/n = const (at constant T, P) **Example: balloon expansion** A balloon contains 0.1 mol of helium at 25°C (298 K) and 1 atm. What volume? - V = nRT/P = (0.1)(0.08206)(298) / 1 = **2.45 L** **Example: cylinder pressure** A 5 L cylinder contains 0.5 mol of nitrogen at 300 K. What pressure? - P = nRT/V = (0.5)(0.08206)(300) / 5 = **2.46 atm** **Density form (useful for gas mixtures):** ρ = (P × M) / (RT) Where M is molar mass of the gas. Tells you the density of a gas given P, T. **At STP (1 atm, 273.15 K):** ρ_O₂ = (1 × 32.00) / (0.08206 × 273.15) = 1.428 g/L ρ_N₂ = (1 × 28.02) / (0.08206 × 273.15) = 1.251 g/L ρ_air ≈ 1.292 g/L (mix of 78% N₂, 21% O₂, trace Ar+CO₂)

How to use this calculator

  1. Identify the three known variables (P, V, n, T) and which one you're solving for.
  2. Temperature MUST be in Kelvin (T_K = T_C + 273.15). Using Celsius or Fahrenheit gives wrong answers.
  3. Pressure and volume need to match R. This calculator uses atm and L; for SI units (Pa, m³) multiply pressure by 101325 and volume by 0.001.
  4. For mixtures, n is total moles of all gas components combined.
  5. Use the ideal gas law for everyday-conditions gases (1 atm, room temp). For high pressure or near condensation, use the van der Waals equation or compressibility factor.
  6. For gas mixtures, partial pressure of each gas = mole fraction × total pressure (Dalton's law).

Worked examples

Inflating a tire

**Scenario:** A car tire holds 2.5 L of air at 280 K (cold morning). After driving, the air temperature rises to 320 K but volume stays roughly the same. What's the new pressure if it started at 2.3 atm? **Calculation:** P₁/T₁ = P₂/T₂ → P₂ = P₁ × T₂/T₁ = 2.3 × 320/280 = 2.63 atm. Pressure rises about 14% with temperature alone. **Result:** The tire reads 2.63 atm (about 38.6 psi) after driving — higher than cold. This is why tire-pressure recommendations are for "cold tires" — check before driving, not after. Over-pressure from heat is normal and tires are designed for it.

CO₂ cartridge for a bike pump

**Scenario:** A 16 g CO₂ cartridge is rated to fill a road bike tire (~0.8 L) to 7 atm (100 psi). Will it work? **Calculation:** 16 g CO₂ ÷ 44 g/mol = 0.364 mol. At 7 atm and 0.8 L: n_needed = PV/RT = (7 × 0.8) / (0.08206 × 293) = 0.233 mol. Cartridge has 0.364 mol — plenty. **Result:** 16 g cartridge has 56% more CO₂ than needed for that pressure-volume target. The excess vents as the cartridge depressurizes. CO₂ is preferred over air for bike pumps because the gas is denser (44 g/mol vs ~29 g/mol for air), letting more "tire pressure" fit in a small cartridge.

Combustion gas volume

**Scenario:** Combustion of 1 mol of methane (CH₄ + 2 O₂ → CO₂ + 2 H₂O) at 25°C, 1 atm. What's the volume of CO₂ produced? **Calculation:** 1 mol CH₄ produces 1 mol CO₂. Volume at 25°C (298 K), 1 atm: V = nRT/P = (1 × 0.08206 × 298) / 1 = 24.46 L. **Result:** Each mole of methane combusts to ~24.5 L of CO₂ (plus 2 mol of water, but water is liquid at 25°C so only the CO₂ contributes to gas volume). A typical kitchen burner using 1 kg of methane (62.5 mol) produces 1530 L of CO₂.

When to use this calculator

**Use the ideal gas law any time you need to relate amount, pressure, volume, or temperature of a gas:**

- **Chemistry homework**: PV = nRT is the standard tool for stoichiometric gas calculations. - **Combustion analysis**: figuring out moles of CO₂ produced or O₂ consumed at lab conditions. - **Pressure/volume conversions**: balloons, gas cylinders, syringes, bell jars. - **HVAC and refrigeration**: refrigerant behavior under pressure and temperature changes. - **Diving and underwater work**: gas behavior at depth uses P-V relations directly. - **Industrial gas storage**: estimating cylinder capacity, leak rates, pressure drops. - **Engineering / aerospace**: cabin pressurization, propellant tank sizing. - **Lab safety**: predicting overpressure scenarios in sealed flasks during heating.

**When NOT to use the ideal gas law (and use real-gas equations instead):**

- **High pressure** (above ~10 atm): gas molecule volumes become non-negligible; use van der Waals or Peng-Robinson. - **Low temperature near condensation** (below boiling point): intermolecular attractions matter; van der Waals corrections needed. - **High-density gases like water vapor near saturation**: use steam tables. - **Very high-precision applications**: aerospace propellants, semiconductor process gases — use NIST REFPROP or compressibility tables.

**Order-of-magnitude estimates the ideal gas law gives you:**

- 1 mole of gas at room T and atmospheric P ≈ 24 L - A 22 L scuba tank at 200 atm holds ~180 mol of gas ≈ 5 kg of air - 1 kg of CO₂ as gas at STP = 22.7 mol × 22.4 L = 509 L - A 1 cubic meter classroom at 25°C, 1 atm contains ~41 mol of gas, mostly N₂ + O₂

**Variations on the basic equation:**

- **Combined gas law** (closed system): P₁V₁/T₁ = P₂V₂/T₂. - **Dalton's law** (mixtures): P_total = Σ P_i, where P_i = x_i × P_total (mole fraction × total). - **Graham's law** (effusion): rate ∝ 1/√M, lighter gases escape faster. - **Van der Waals**: (P + an²/V²)(V − nb) = nRT, real-gas correction.

Common mistakes to avoid

  • Using Celsius or Fahrenheit instead of Kelvin. The ideal gas law requires absolute temperature. T(K) = T(°C) + 273.15.
  • Mismatched units between pressure and R. Using R = 0.08206 L·atm/(mol·K) but pressure in psi or kPa gives wrong answers.
  • Using PV = nRT under very-non-ideal conditions. Below boiling point or above ~10 atm, real-gas corrections matter.
  • Forgetting that n is total moles for mixtures, not the moles of one component.
  • Using volume of gas mixed with liquid water without subtracting water's vapor pressure. Important for "gas collected over water" experiments.
  • Computing density without unit care. ρ = PM/RT where M is molar mass in g/mol; gives ρ in g/L when P is atm, T is K.
  • Confusing STP (0 °C, 1 atm) with NTP (Normal Temperature and Pressure: 20 °C, 1 atm) or SATP (Standard Ambient TP: 25 °C, 100 kPa). They're all "standard" by some definition.

Frequently Asked Questions

Sources & further reading

SponsoredShop Top Deals on AmazonSupport CalcMountain — browse top-rated products at no extra cost to you.

Related Calculators