Ideal Gas Law Calculator (PV = nRT)
PV = nRT — Solve for
Result
Two-State Gas Laws
Inputs
Result
Assumes constant temperature and moles (isothermal). Uses the same unit conversions as PV=nRT.
Inputs
Result
Assumes constant pressure and moles (isobaric). Temperatures are absolute (K).
Inputs
Result
Assumes constant volume and moles (isochoric). Temperatures are absolute (K).
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 (atm, kPa, bar, mmHg for pressure; L, mL, m³ for volume; K or °C for temperature), choose a
convenient gas constant R (either 0.082057 L·atm·mol⁻¹·K⁻¹
or
8.314462618 J·mol⁻¹·K⁻¹
), 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.