SolveKit

Ideal Gas Law Calculator

Fill in any three of pressure, volume, amount of gas and temperature; the fourth is solved from the ideal gas law.

By Dr. Priya Nair, science writer and former university physics lecturer · Updated

Ideal Gas Law Calculator

Enter any 3 known values — the others are solved as you type. Change units at any time.

Fill in the values you know.

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 V = n R T
R = 8.314 462 618 J·mol⁻¹·K⁻¹
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)?

  1. Convert to SI: T = 0 + 273.15 = 273.15 K; P = 1 atm = 101,325 Pa.
  2. V = nRT / P = 1 × 8.314462618 × 273.15 / 101,325 = 0.022414 m³.
  3. 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

Related calculators

More in Chemistry calculators.