Solve for Pressure (P), Volume (V), Moles (n), or Temperature (T) using the universal gas law. Interactive PV isotherm graph, real‑time validation, and detailed step‑by‑step derivation.
The ideal gas law (PV = nRT) combines Boyle's, Charles's, and Avogadro's laws into a single elegant equation. It describes the behavior of hypothetical ideal gases — particles with negligible volume and no intermolecular forces. Although no real gas is perfectly ideal, the law provides remarkable accuracy at high temperatures and low pressures, serving as the cornerstone of chemical engineering, meteorology, and astrophysics.
PV = nRT
Where: P = absolute pressure (atm), V = volume (L), n = amount of substance (mol), T = absolute temperature (K), R = universal gas constant (0.082057 L·atm·mol⁻¹·K⁻¹).
Empirical gas laws emerged in the 17th–19th centuries: Robert Boyle (1662, P ∝ 1/V), Jacques Charles (1787, V ∝ T), and Amedeo Avogadro (1811, V ∝ n). The unified equation was formulated by Émile Clapeyron in 1834. The constant R was later determined accurately by Henri Victor Regnault. Modern metrology defines R = 8.314462618 J/(mol·K) in SI, but the 0.082057 L·atm/(mol·K) variant remains standard in chemistry labs worldwide. The ideal gas law also laid the groundwork for the kinetic molecular theory and statistical mechanics.
Given three known quantities, we isolate the unknown using algebraic rearrangement:
Our algorithm first checks exactly one missing field among the four. If the temperature is entered in Celsius, it’s converted to Kelvin (K = °C + 273.15). Absolute zero constraints are enforced: T must be > 0 K, and n, P, V must be positive. After solving, the program verifies consistency with the ideal gas ratio PV/(nRT) — which should be 1 (within floating tolerance). The interactive PV diagram draws an isotherm based on the current n and T (if available; otherwise default n=1, T=298K) and highlights the (P,V) coordinate if both are present.
Example: A 4.0 L container holds 0.25 mol of helium at 300 K. What is the pressure?
Solution: P = nRT/V = (0.25 mol × 0.082057 × 300 K) / 4.0 L = (6.154275)/4 = 1.5386 atm.
Our calculator returns P = 1.5386 atm, and the PV graph displays the isotherm with the corresponding point.
At high pressures (>10 atm) or near condensation temperatures, intermolecular forces and molecular volume cause deviations. The van der Waals equation (P + a(n/V)²)(V - nb) = nRT corrects for these effects. However, for most educational and many engineering contexts (air at ambient conditions, noble gases, combustion exhaust), the ideal gas law yields error < 1–2%.
| Gas (1 atm, 273K) | Ideal Molar Volume (L) | Real Molar Volume (L) | Deviation % |
|---|---|---|---|
| Helium | 22.414 | 22.426 | +0.05% |
| Nitrogen | 22.414 | 22.402 | -0.05% |
| Carbon Dioxide | 22.414 | 22.263 | -0.67% |
| Water Vapour (373K) | 30.62 | 30.19 | -1.4% |
A scuba tank stores air at 200 atm and 12 L. At 295 K, the moles of air: n = PV/(RT) = (200 × 12) / (0.082057 × 295) ≈ 99.1 mol. Using the ideal gas law, the diver can estimate the equivalent surface volume (≈ 2400 L at 1 atm). This calculation is critical for dive planning and safety. The interactive calculator above reproduces this instantly using the “scuba” preset.