Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for any variable. Calculate pressure, volume, moles, or temperature of ideal gases with full unit conversions and gas property calculations.

kPa
mol
K
Used for mass and density calculations
g/mol
Pressure
101.325 kPa
1.0000 atm | 1.0133 bar
Volume
24.4654 L
0.024465 m³ | 24,465.4 mL
Moles
1.000000
6.022e+23 molecules
Temperature
298.15 K
25.00 °C | 77.00 °F
Mass
29.000 g
Molar mass: 29 g/mol
Gas Density
1.1853 kg/m³
At given P and T
Molar Volume
24.465 L/mol
Volume per mole at given conditions
VariableSymbolValueAll Units
PressureP101.325 kPa1.0000 atm / 14.70 psi
VolumeV24.4654 L0.024465 m³ / 24,465.4 mL
Molesn1.000000 mol6.022e+23 molecules
TemperatureT298.15 K25.00 °C / 77.00 °F
Gas ConstantR8.31446 J/(mol·K)0.08206 L·atm/(mol·K)
Planning notes, formulas, and examples

About the Ideal Gas Law Calculator (PV = nRT)

The **Ideal Gas Law Calculator** solves PV = nRT for any of the four variables — pressure, volume, moles, or temperature. This is arguably the most important equation in gas chemistry and thermodynamics, relating the macroscopic properties of an ideal gas through the universal gas constant R = 8.31446 J/(mol·K).

PV = nRT unifies Boyle's Law (P ∝ 1/V), Charles's Law (V ∝ T), Avogadro's Law (V ∝ n), and Gay-Lussac's Law (P ∝ T) into one elegant equation. Whether you need to find the volume of a balloon at altitude, the pressure inside a compressed gas cylinder, the number of moles in a container, or the temperature change during a process — this calculator handles it all.

Full unit conversion is built in for pressure (kPa, atm, bar, psi), volume (L, mL, m³, ft³), and temperature (K, °C, °F). Additional outputs include mass, density, molar volume, and molecule count. Use presets for common scenarios or enter your own values.

When This Page Helps

PV = nRT is the foundation of gas calculations in chemistry, physics, and engineering. This calculator eliminates unit confusion by handling all common systems automatically, and provides derived quantities like density and molecule count alongside the primary solution.

Whether you are solving homework problems, designing a gas storage system, or analyzing experimental data, having a reliable PV = nRT solver with full unit support saves time and prevents errors.

How to Use the Inputs

  1. Select which variable to solve for (P, V, n, or T).
  2. Enter the three known variables with appropriate units.
  3. Optionally enter the molar mass for mass and density calculations.
  4. Use preset buttons for common scenarios (STP, balloon, compressed tank).
  5. Read the solved variable and all converted values from the output.
  6. Review the summary table for a complete picture of the gas state.
Formula used
Ideal Gas Law: PV = nRT Where: - P = pressure (Pa) - V = volume (m³) - n = amount of substance (moles) - R = universal gas constant = 8.31446 J/(mol·K) - T = absolute temperature (K) Rearranged: P = nRT/V, V = nRT/P, n = PV/RT, T = PV/nR

Example Calculation

Result: 24.465 L

Solving for V with P = 101,325 Pa, n = 1 mol, T = 298.15 K: V = nRT/P = (1)(8.31446)(298.15)/101325 = 0.024465 m³ = 24.465 L. This is the molar volume at 25°C and 1 atm.

Tips & Best Practices

  • Always check that temperature is positive in Kelvin — negative Kelvin values are physically impossible.
  • For real gases at high pressure, multiply by the compressibility factor Z: PV = ZnRT.
  • At STP (0°C, 1 atm), 1 mole of ideal gas = 22.414 L. This is a useful mental benchmark.
  • Partial pressure of a gas in a mixture: Pi = xi × Ptotal, where xi is the mole fraction.
  • Gas density increases with pressure and molar mass, but decreases with temperature.
  • The ideal gas law works excellently for most gases at atmospheric conditions (within 0.5% for air).

History and Derivation

The ideal gas law combines empirical observations spanning two centuries. Boyle (1662) found PV = constant at fixed T. Charles (1787) discovered V/T = constant at fixed P. Avogadro (1811) proposed that equal volumes contain equal numbers of molecules. Combining these with the universal gas constant R (first calculated by Clapeyron in 1834) yields PV = nRT.

The kinetic molecular theory provides a microscopic derivation: gas molecules are point particles in random motion, with pressure arising from their collisions with container walls. This leads directly to PV = NkT, where N is the number of molecules and k_B is Boltzmann's constant. Since N = nN_A and R = N_Ak_B, we recover PV = nRT.

Applications Beyond Chemistry

**Meteorology:** Weather models use the ideal gas law (often written as P = ρRT/M) to relate atmospheric pressure, temperature, and density. The hydrostatic equation combined with the ideal gas law gives the barometric formula for pressure vs altitude.

**Scuba Diving:** Boyle's Law (a special case of PV = nRT) determines how air volume changes with depth. At 10 m depth (2 atm), lung volume halves. This is why ascending too quickly causes decompression sickness — dissolved gases expand as pressure decreases.

**Automotive:** Tire pressure changes with temperature follow Gay-Lussac's Law. A tire at 35 psi in summer (35°C) drops to about 32 psi in winter (-5°C). This calculator can determine the exact pressure change.

Limitations and Real Gas Behavior

The ideal gas assumption breaks down when molecules interact significantly. The van der Waals equation adds correction terms: (P + a/V²)(V - b) = nRT, where 'a' accounts for intermolecular attractions and 'b' for molecular volume. For precise engineering calculations involving high pressures or temperatures near the boiling point, these corrections are essential.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • R = 8.31446 J/(mol·K) = 0.08206 L·atm/(mol·K) = 1.987 cal/(mol·K). It connects energy, amount of substance, and temperature for ideal gases.