STP Gas Law Calculator

Solve the ideal gas law for pressure, volume, moles, or temperature. Supports multiple pressure units (atm, kPa) and temperature in °C or Kelvin. Volume is expressed in liters (L). Visualize the molar volume at STP (22.414 L/mol) and get instant results with precise gas constant handling.

L
Volume is fixed in liters (L).
mol
Leave the target field empty; we'll compute it from the other three.
? Molar Volume at STP (1 mol → V)
? Balloon: 2 mol He, 298 K, 1 atm → V
? Scuba: 10 L, 300 K, 5 mol → P
?️ 25°C, 1.5 mol, 2 atm → V
? Moles from STP volume (44.8 L → n)
Privacy-first: All calculations run locally in your browser. No data is uploaded or stored.

Understanding the Ideal Gas Law & STP

The ideal gas law (PV = nRT) combines Boyle's, Charles's, and Avogadro's laws into a single equation describing the behavior of most gases under moderate conditions. STP (Standard Temperature and Pressure) is a reference state defined by IUPAC as 0°C (273.15 K) and 105 Pa (1 bar), though many textbooks still use 1 atm = 101.325 kPa. This calculator adopts the classic chemistry convention: 1 atm and 273.15 K for STP, yielding the well-known molar volume of 22.414 L/mol.

PV = nRT     R = 0.082057 L·atm·mol-1·K-1 (atm·L)  |  R = 8.3145 L·kPa·mol-1·K-1 (kPa·L)

Historical & Scientific Authority

The ideal gas law evolved from Émile Clapeyron's 1834 formulation, building on Robert Boyle’s (1662), Jacques Charles’ (1787), and Amedeo Avogadro’s (1811) discoveries. Avogadro’s hypothesis that equal volumes of gases at the same T and P contain equal numbers of molecules laid the groundwork for the mole concept. The universal gas constant R was later determined experimentally with high precision. Today, the ideal gas law remains a cornerstone in thermodynamics, chemical engineering, and atmospheric science.

Why Use an Interactive Gas Law Solver?

  • Rapid homework & lab checks: Verify experimental data or solve for missing variables in seconds.
  • Unit flexibility: Switch between atm/kPa and Kelvin/Celsius without manual conversion.
  • STP comparisons: Quickly determine whether a gas is at standard conditions and compute molar volumes.
  • Real-world context: From scuba tank capacity to airbag inflation chemistry — the ideal gas law is everywhere.

How the Calculation Works

Based on your chosen target variable, the calculator rearranges PV = nRT:

  • Pressure (P) = nRT / V
  • Volume (V) = nRT / P
  • Moles (n) = PV / (RT)
  • Temperature (T) = PV / (nR)

Temperature is automatically converted to Kelvin if provided in Celsius (K = °C + 273.15). The gas constant R is selected based on pressure unit: 0.082057 L·atm/(mol·K) for atmospheres or 8.3145 L·kPa/(mol·K) for kilopascals. All results are displayed with 4 decimal precision, suitable for academic use.

STP & Molar Volume Deep Dive

At STP (1 atm, 273.15 K), one mole of an ideal gas occupies exactly V = nRT/P = (1 mol * 0.082057 * 273.15 K) / 1 atm = 22.414 L. This value is fundamental in stoichiometry: given a gas volume at STP, you can instantly determine moles (n = V/22.414). Real gases like O2, N2, and CO2 approximate this within ~0.1–0.5% deviation at STP. The calculator includes a specific molar volume indicator for reference.

Case Study: Industrial Gas Storage

A chemical plant stores nitrogen in a 500 L tank at 25°C and 150 atm. To estimate the mass of gas, engineers first solve for moles: n = PV/(RT) with R = 0.082057. n = (150 * 500) / (0.082057 * 298.15) ≈ 3065 mol. Mass = 3065 mol × 28.0134 g/mol ≈ 85.8 kg. Using our calculator, you can replicate this workflow and adjust parameters for safety checks or different storage temperatures. The ideal gas law offers a quick, reliable estimate before applying real‑gas corrections (e.g., van der Waals).

Common Misconceptions & Limitations

  • Ideal gas assumption fails at high pressure / low temperature: Intermolecular forces and molecular volume become significant. Our calculator is best for pressures below ~10 atm and temperatures above ~200 K.
  • STP definitions vary: IUPAC changed STP to 1 bar (100 kPa) and 0°C after 1982, giving molar volume 22.711 L. This tool uses the traditional 1 atm definition for compatibility with most chemistry curricula. Always check your context.
  • R constant units must match: When using kPa, the calculator automatically applies R = 8.3145. Do not mix atm pressure with kPa R.

Example Results & Verification Table

Scenario Input (P,V,n,T) Solved for Result
Molar volume STP P=1 atm, n=1 mol, T=273.15 K Volume 22.414 L
Balloon helium n=2 mol, T=298 K, P=1 atm Volume 48.90 L
Scuba tank V=10 L, T=300 K, n=5 mol Pressure 12.31 atm
Moles from 44.8 L at STP V=44.8 L, P=1 atm, T=273.15 K Moles 2.000 mol

Beyond the Basics: Real Gases & Advanced Topics

For high‑accuracy work (e.g., natural gas metering, cryogenics), the van der Waals equation [ (P + a(n/V)²)(V - nb) = nRT ] introduces correction factors for molecular attraction and finite volume. While our calculator focuses on the ideal gas law, we encourage users to apply it as a first‑order approximation. For most educational and many engineering tasks, PV = nRT provides remarkable accuracy.

Rooted in physical chemistry standards – This tool implements the ideal gas law following IUPAC recommendations for standard states and the NIST CODATA value of R = 8.314462618 L·kPa·mol⁻¹·K⁻¹ (rounded to 8.3145). The interface and educational content have been reviewed by the GetZenQuery tech team, referencing reliable sources: Atkins' Physical Chemistry, CRC Handbook of Chemistry and Physics, and peer‑reviewed educational resources. Last updated June 2026.

Frequently Asked Questions

The gas constant depends on pressure units. For atmospheres we use R = 0.082057 L·atm/(mol·K); for kilopascals we use R = 8.3145 L·kPa/(mol·K). Both are equivalent and ensure dimensional consistency.

For low‑to‑moderate pressures and above 200 K, it works well for monatomic and diatomic gases (He, Ar, N₂, O₂). For polar gases like water vapor or high pressures, expect deviations.

STP = Standard Temperature and Pressure (0°C, 1 atm). It provides a common reference for comparing gas volumes and calculating molar quantities in stoichiometry.

We use double-precision arithmetic and display 4 decimals, which is sufficient for most lab and classroom settings. The limiting factor is the ideal gas approximation, not the computation.
References: IUPAC – Standard Conditions, NIST Real Fluids, Atkins, P. “Physical Chemistry” 11th edition, Oxford Press.