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 R | Units |
|---|---|
| 0.08206 | L·atm/mol·K |
| 8.314 | J/mol·K (SI) |
| 8.314 | kPa·L/mol·K |
| 62.36 | L·Torr/mol·K |
| 1.987 | cal/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.