How this works (Ideal Gas Law & Classic Gas Laws)
The ideal gas law ties together four core variables—pressure (P), volume (V), amount of substance (n) in moles, and absolute temperature (T)—through the compact relation PV = nRT. In practice this means that if you know any three of the variables, you can compute the fourth. Our calculator handles the algebra, unit conversions, and numeric precision for you. Enter values in your preferred units (including atm, kPa, bar, psi, torr, inHg, L, mL, cm³, m³, ft³, gallons, mol, mmol, grams with molar mass, particles, K, or °C), choose a convenient gas constant R, and we convert internally to consistent units before returning results in the units you selected.
A key detail is that temperature in gas laws is always measured on an absolute scale. If you enter
°C, the tool converts to kelvin via T(K) = T(°C) + 273.15. Values at or below 0 K are non-physical, so
the calculator alerts you if input choices would imply an impossible state. Similarly, pressure and volume must be
positive for physically meaningful results.
For quick comparisons between two states of the same sample of gas, the classic single-variable relations drop out of PV = nRT by holding two variables constant:
- Boyle’s Law (isothermal, constant T and n):
P₁V₁ = P₂V₂. Increasing pressure compresses volume proportionally. - Charles’s Law (isobaric, constant P and n):
V₁/T₁ = V₂/T₂. Heating a gas expands its volume linearly with absolute temperature. - Gay-Lussac’s Law (isochoric, constant V and n):
P₁/T₁ = P₂/T₂. Heating at fixed volume raises pressure in direct proportion to temperature.
Two widely referenced reference points are STP (1 atm and 273.15 K) and SATP (1 bar and 298.15 K). At STP, one mole of an ideal gas occupies approximately 22.414 L; at SATP the molar volume is about 24.465 L. Use the STP button for a quick check or classroom demonstration, then adjust to match your assignment or lab protocol.
Remember that the “ideal” model assumes point-like molecules with no intermolecular forces and perfectly elastic collisions. This approximation works best at low pressures and moderate temperatures. At high pressures, very low temperatures, or near condensation, real gases deviate: compressibility factors differ from one, and equations of state such as van der Waals may be more accurate. For typical chemistry and physics coursework, though, PV = nRT provides reliable intuition and quick, transparent calculations.
Tips: check that temperatures are in K, keep units consistent, and verify significant figures. For mixtures, Dalton’s law lets you use partial pressures in the same framework: Ptotal = ΣPi. All computations here run locally in your browser for privacy.
Last reviewed: June 30, 2026. Formulas used: PV = nRT, P₁V₁/T₁ = P₂V₂/T₂, and direct gas-law special cases. Constants and definitions are checked against NIST/CODATA gas constant references and standard general chemistry definitions of STP, SATP, Dalton's law, and ideal-gas assumptions.
