What it does
The ideal gas law ties together the pressure, volume, temperature and amount of a gas. Know any three and you can find the fourth. Use it for chemistry homework, to estimate how much gas is in a cylinder, or to see how pressure changes when a sealed container warms up. The calculator accepts common units for each quantity and converts them before solving.
How it's calculated
P = nRT ÷ V · V = nRT ÷ P · n = PV ÷ RT · T = PV ÷ nR
R = 8.314 462 618… J/(mol·K) (exact)
P is absolute pressure in pascals, V is volume in cubic meters, n is the amount of gas in moles, and T is the absolute temperature in kelvins (°C + 273.15). Since the 2019 SI redefinition, R is exact: it's the Avogadro constant times the Boltzmann constant. In other units, R ≈ 0.082057 L·atm/(mol·K). The pressure conversions are exact too: 1 atm = 101,325 Pa, 1 bar = 100,000 Pa, and 1 psi = 6,894.757 Pa.
Worked examples
- Molar volume: 1 mol of gas at 0 °C (273.15 K) and 1 atm (101,325 Pa). V = 1 × 8.314462618 × 273.15 ÷ 101,325 = 0.022414 m3 = 22.414 L. That's the "22.4 L per mole" from chemistry class.
- A sealed container: 2 mol in 10 L (0.01 m3) at 300 K. P = 2 × 8.314462618 × 300 ÷ 0.01 = 498,868 Pa = 498.87 kPa, about 4.92 atm.
- Finding the temperature: 1 mol in 25 L at 100 kPa. T = 100,000 × 0.025 ÷ (1 × 8.314462618) = 300.68 K, or 27.53 °C.
Getting a realistic number
- Always use absolute temperature and pressure. The calculator converts °C and °F to kelvins for you. But a tire gauge reads gauge pressure, which is pressure above the atmosphere. Add about 101.3 kPa (14.7 psi) to get absolute pressure first.
- Real gases aren't ideal. The law works well for air, nitrogen and oxygen near room conditions. At high pressure (tens of atmospheres or more), or close to the temperature where the gas turns liquid, the real volume can differ noticeably.
- Which "STP"? Older textbooks use 0 °C and 1 atm (22.414 L/mol). IUPAC's current standard uses 0 °C and 100 kPa (22.711 L/mol). Check which one your course uses.