Gas Law Calculator

One Equation, Four Unknowns

The ideal gas law ties pressure, volume, moles, and temperature into a single relationship that governs everything from a bicycle pump to a chemical plant reactor. Because it links four variables at once, most real problems only give you three and ask for the fourth — which is exactly what this calculator is built to solve, in any direction.

The Formula

P × V = n × R × T
R = 0.0821 L·atm / (mol·K)

Temperature must be in kelvin for the constant above to apply; enter it in Celsius and the calculator converts automatically by adding 273.15 before solving.

Where This Calculation Matters

  • Reactor and cylinder design — engineers size gas storage vessels around expected pressure at a given temperature and mole count.
  • Laboratory gas collection — converting a measured volume of collected gas into moles is a routine step in quantitative experiments.
  • Scuba diving and pneumatics — predicting how a fixed amount of gas behaves as pressure or temperature changes underlies tank fill calculations.
  • Weather and atmospheric science — the same relationship, applied to air, links pressure, temperature, and density in the atmosphere.

Molar Volume at Different Temperatures

Volume occupied by 1 mole of ideal gas at 1 atm (computed from PV = nRT)
TemperatureVolume of 1 mol at 1 atm
0 °C (273.15 K) — STP22.426 L
25 °C (298.15 K) — room temperature24.478 L
37 °C (310.15 K) — body temperature25.463 L

These figures use R = 0.0821 L·atm/(mol·K), the value this calculator applies internally; more precise CODATA values of R differ only in the fourth significant figure.

How to Use This Calculator

  1. Select which quantity to solve for: pressure, volume, moles, or temperature.
  2. Fill in the three known values among Pressure (atm), Volume (L), Moles (mol), and Temperature (choose Celsius or kelvin).
  3. Select Calculate to solve the ideal gas law for the missing quantity.

Related Calculations

If moles, temperature, and pressure are known and only volume is missing, the dedicated Volume of Gas Calculator skips the mode selection. For converting a resulting mole count into a mass, use the Moles Calculator.