Ideal Gas Law Calculator Formula
Understand the math behind the ideal gas law calculator. Each variable explained with a worked example.
Formulas Used
Pressure
pressure_atm = moles * 0.082057 * temperature / volumePressure (Pa)
pressure_pa = moles * 8.314 * temperature / (volume * 0.001)Variables
| Variable | Description | Default |
|---|---|---|
moles | Amount of Gas (n)(mol) | 1 |
temperature | Temperature(K) | 273.15 |
volume | Volume(L) | 22.414 |
How It Works
Ideal Gas Law
The ideal gas law relates the pressure, volume, temperature, and amount of a gas.
Formula
PV = nRT
where R = 0.082057 L·atm/(mol·K) or 8.314 J/(mol·K). This law is accurate for gases at moderate pressures and temperatures.
Worked Example
1 mole of gas at 273.15 K (0°C) in 22.414 L (STP conditions).
moles = 1temperature = 273.15volume = 22.414
- 01P = nRT / V
- 02P = 1 * 0.082057 * 273.15 / 22.414
- 03P = 22.414 / 22.414
- 04P = 1.000 atm (as expected at STP)
Ready to run the numbers?
Open Ideal Gas Law Calculator