← Back to ElementVault
Chemistry · Calculator

Gas Laws Calculator

PV = nRT — fill any three values, solve for the fourth
Solve for variable
Known values
Result
R = 0.08206 L·atm/mol·K = 8.314 J/mol·K  ·  STP 0°C, 1 atm → 22.414 L/mol  ·  SATP 25°C, 1 bar → 24.789 L/mol
Need stoichiometry, solubility, or molar mass too?
The full ElementVault workbench includes Stoichiometry, Solubility Tables, Molar Mass, the Equation Balancer, and 8 other calculators alongside the interactive periodic table.
Open full workbench →
More ElementVault calculators: Molar Mass · pH & Buffer · Equation Balancer · Oxidation States · All 12 calculators →

What this calculator does

The ideal gas law, PV = nRT, relates a gas's pressure, volume, moles, and temperature. Give the calculator any three of those four values and it solves for the fourth — no need to rearrange the equation by hand or remember which unit R expects. Enter values in whichever units you have; the calculator converts internally.

R — the ideal gas constant, in different units

R shows up with a different numeric value depending on which units you're using for pressure and volume. This calculator always converts your inputs to atm and L internally and uses R = 0.08206 L·atm/mol·K, but it's worth knowing the other common forms:

Value of RUnits
0.08206L·atm/mol·K
8.314J/mol·K (SI)
8.314kPa·L/mol·K
62.36L·Torr/mol·K
1.987cal/mol·K

8.314 J/mol·K and 8.314 kPa·L/mol·K are the same number because 1 kPa·L equals exactly 1 J — pressure (kN/m²) times volume (m³×10⁻³) gives kJ×10⁻³ = J.

Worked examples

1. Molar volume at STP (solve for V). One mole of any ideal gas at standard temperature and pressure (0°C = 273.15 K, 1 atm): V = nRT/P = (1 mol × 0.08206 × 273.15 K) / 1 atm = 22.4147 L — the classic "22.4 liters per mole" figure from general chemistry.

2. Solve for pressure. 0.5 mol of gas in a 2 L container at 350 K: P = nRT/V = (0.5 mol × 0.08206 × 350 K) / 2 L = 7.1802 atm.

3. Solve for moles. A tank holds gas at 5 atm in a 10 L volume at 298 K (25°C): n = PV/RT = (5 atm × 10 L) / (0.08206 × 298 K) = 2.0447 mol.

Common errors to avoid

Forgetting to convert temperature to Kelvin. The ideal gas law only works with absolute temperature. Plugging in Celsius or Fahrenheit directly (rather than converting to Kelvin first) is the single most common mistake — this calculator converts for you automatically from whichever scale you pick.

Mismatched R and pressure units. If you look up R = 8.314 J/mol·K but your pressure is in atm, the units won't cancel and the math silently breaks. Either convert your pressure to Pa first, or use R = 0.08206 L·atm/mol·K instead — this calculator handles that conversion internally so you never have to pick the matching R by hand.

Old STP vs. current STP. 22.4 L/mol assumes the older 1-atm definition of standard pressure. The current IUPAC definition uses 1 bar, giving 22.7 L/mol instead. Check which convention your course uses.

Frequently asked questions

Which value of R should I use?

It depends on the units of P and V, since R must cancel them out. With pressure in atm and volume in L, use R = 0.08206 L·atm/mol·K (what this calculator uses internally, converting your chosen units to atm and L first). With pressure in kPa and volume in L, use R = 8.314 kPa·L/mol·K. In SI base units (Pa, m³), use R = 8.314 J/mol·K. With pressure in Torr/mmHg, use R = 62.36 L·Torr/mol·K. For thermochemistry in calories, use R = 1.987 cal/mol·K.

What's the difference between old STP and IUPAC STP?

Both use 0°C (273.15 K), but the pressure differs. The older, still widely-taught convention uses 1 atm (101.325 kPa), giving a molar volume of 22.414 L/mol. The current IUPAC definition (since 1982) uses 1 bar (100 kPa) instead, giving 22.711 L/mol. Most general-chemistry courses still teach 22.4 L/mol at STP — check which convention your course or textbook uses before quoting a molar volume.

When does the ideal gas law break down?

The ideal gas law assumes molecules have zero volume and no intermolecular forces — neither is exactly true. It gets noticeably inaccurate at high pressure (molecules are forced close enough that their own volume matters), at low temperature (especially near a gas's condensation point, where attractive forces slow molecules down), and for polar or hydrogen-bonding molecules (water vapor, ammonia) which attract each other more strongly than nonpolar gases like helium or nitrogen. For those regimes, the Van der Waals equation or other real-gas equations of state are more accurate.

What's the difference between the ideal gas law and the combined gas law?

The combined gas law (P₁V₁/T₁ = P₂V₂/T₂) tracks a fixed amount of gas as it moves between two states — useful when moles don't change and you're not given R at all. The ideal gas law (PV = nRT) is more general: it works for a single state and explicitly includes moles, so it's what you need whenever the amount of gas is part of the question, or you only have one set of conditions instead of a before/after pair.