Ideal Gas Law Calculator
The ideal gas law calculator computes any one of the four state variables (pressure, volume, moles, temperature) of an ideal gas given the other three. PV = nRT is the fundamental equation of gas thermodynamics and is used throughout chemistry, physics, and engineering. It unifies Boyle's Law (P*V = constant at fixed T), Charles' Law (V proportional to T at fixed P), and Gay-Lussac's Law (P proportional to T at fixed V). The calculator supports multiple pressure units (Pa, kPa, atm, psi) and volume units (L, mL, m^3) with automatic conversion. Temperature can be entered in Celsius or Kelvin.
Ideal gas law formula
PV = nRT
R = 8.314 J/(mol*K) = 8.314 Pa*m^3/(mol*K)
R = 0.08206 L*atm/(mol*K)
T(K) = T(degC) + 273.15
At STP (0 degC, 1 atm): V = 22.414 L per mole
Common gas quantities at 25 degC, 1 atm
- 1 mole of any ideal gas occupies 24.47 L at 25 degC, 1 atm.
- 1 L of air at room conditions contains about 0.041 mol of gas.
- A 10 L balloon at 1 atm and 25 degC contains 0.41 mol of gas.
- Increasing pressure to 2 atm in a rigid container doubles molar concentration.
Ideal gas law: frequently asked questions
What is the ideal gas law?
The ideal gas law is PV = nRT, where P is pressure, V is volume, n is moles of gas, R is the universal gas constant (8.314 J/mol*K), and T is temperature in Kelvin. It combines Boyle's, Charles', and Avogadro's laws into a single equation that describes the state of any ideal gas.
What is the universal gas constant R?
R = 8.314 J/(mol*K) = 8.314 Pa*m^3/(mol*K). In other units: R = 0.08206 L*atm/(mol*K) = 62.36 L*mmHg/(mol*K) = 1.987 cal/(mol*K). The value you use depends on what units you use for P and V. The calculator uses SI units internally.
When does real gas behavior deviate from ideal?
Ideal gas behavior breaks down at high pressures (above about 10 atm) where molecules are close enough that intermolecular forces matter, and at low temperatures near the boiling point where gas condenses. For most lab conditions (25 degC, 1 atm), ideal gas law errors are less than 1%.
What is STP and how does it affect gas volume?
STP (Standard Temperature and Pressure) is 0 degC (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of ideal gas occupies 22.414 L. IUPAC's new STP (since 1982) uses 0 degC and 100 kPa, giving 22.711 L/mol. These molar volumes are useful for stoichiometry calculations.
How do I calculate the number of moles from gas volume?
n = PV / (RT). For example, 5.0 L of nitrogen at 2.0 atm and 25 degC (298 K): n = (2.0 * 5.0) / (0.08206 * 298) = 10.0 / 24.45 = 0.409 mol. Multiply by molar mass to get grams: 0.409 mol * 28.0 g/mol = 11.5 g of nitrogen.
Official sources
- NIST: NIST CODATA Value: Molar Gas Constant R.
- IUPAC: IUPAC Recommendations on Physical-Chemical Data.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.