How to use this calculator
Enter the three quantities you know, each with its own unit. Temperature can be typed in Celsius, Fahrenheit, kelvin or Rankine; it is always converted to kelvin before solving, because the ideal gas law only works with absolute temperature. Pressure accepts pascals, kilopascals, bar, atmospheres, psi, mmHg and torr.
Gauge readings (for example a tire gauge showing 32 psi) measure pressure above atmospheric. Add about 14.7 psi or 101.3 kPa to get absolute pressure before entering it. Change any input and the missing quantity updates instantly, which makes it easy to see how heating a sealed container raises its pressure.
The formula
- P
- pressure
- V
- volume
- n
- amount of gas
- T
- temperature
The ideal gas law combines Boyle's law (P ∝ 1/V), Charles's law (V ∝ T) and Avogadro's law (V ∝ n) into one equation. R, the molar gas constant, is exact in the 2019 SI because it equals the Boltzmann constant times the Avogadro constant.
Worked example
What volume does one mole of an ideal gas occupy at 0 °C and 1 atm (standard temperature and pressure)?
- Convert to SI: T = 0 + 273.15 = 273.15 K; P = 1 atm = 101,325 Pa.
- V = nRT / P = 1 × 8.314462618 × 273.15 / 101,325 = 0.022414 m³.
- Convert: 0.022414 m³ × 1,000 = 22.414 L.
One mole occupies 22.41 L — the familiar "molar volume at STP" from general chemistry.
Assumptions and limits
- Gas molecules have negligible volume and do not attract one another. Real gases deviate at high pressure (above ~10 atm) and near condensation.
- Pressure must be absolute and temperature must be absolute (kelvin) for the equation itself; the calculator handles the conversion.
Frequently asked questions
What is STP?
IUPAC currently defines standard temperature and pressure as 273.15 K and 100 kPa, giving a molar volume of 22.71 L. Many textbooks still use 1 atm (101.325 kPa), giving 22.41 L.
Why must temperature be in kelvin?
The law is proportional to absolute temperature. At 0 °C the gas still has thermal energy; doubling from 10 °C to 20 °C does not double the volume, but doubling from 283 K to 566 K does.
Can I use this for air in a scuba tank?
Roughly. At 200 bar, air deviates from ideal behavior by a few percent, so the real amount of gas is slightly less than calculated.
Sources
- NIST CODATA — molar gas constant R
- OpenStax Chemistry 2e, §9.2 Relating Pressure, Volume, Amount, and Temperature
- IUPAC Gold Book — standard conditions for gases
Related calculators
- Molarity CalculatorMass, moles, volume and concentration.
- Density CalculatorDensity, mass and volume.
- Half-Life CalculatorRadioactive decay and remaining amount.
More in Chemistry calculators.