# Gas Law Calculator - Ideal Gas Law PV=nRT, Combined Gas Law & Van der Waals

> Free gas law calculator: solve PV=nRT for any variable, combined gas laws, gas density, Dalton's partial pressures, gas over water and van der Waals Z.

- URL: https://qilingtools.com/en/math/gas-law
- Category: Chemistry Tools (https://qilingtools.com/en/chemistry)
- Tags: [Chemistry](https://qilingtools.com/en/tags/chemistry), [Physics](https://qilingtools.com/en/tags/physics)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

The ideal gas law PV = nRT links pressure P, volume V, amount n and absolute temperature T through the gas constant R = 8.314462618 J/(mol·K). One mole of an ideal gas at 0 °C and 1 atm (the classic STP) occupies V = nRT/P = 1 × 0.082057 × 273.15 / 1 ≈ 22.414 L, and about 24.79 L at 25 °C and 1 bar (SATP). This calculator has five parts. The ideal gas tab solves for any one of P, V, n or T, with pressure in Pa, kPa, atm, bar, mmHg, torr or psi, volume in L, mL or m³, and temperature in K, °C or °F; n can be entered directly or as a mass plus a chemical formula, and the value of R in your chosen units is shown. The combined gas law tab solves P₁V₁/T₁ = P₂V₂/T₂ for any unknown, including Boyle's, Charles's, Gay-Lussac's and Avogadro's laws as special cases. The density tab uses ρ = PM/(RT) to find a gas's density from its formula, or its molar mass from a measured density. The partial pressure tab applies Dalton's law to an editable mixture (dry air is built in) and corrects gas collected over water using the IAPWS-IF97 water vapour pressure. The van der Waals tab has a and b constants for more than twenty gases such as He, N₂, CO₂, NH₃ and CH₄, compares real and ideal pressure or volume, and gives the compressibility factor Z, the critical constants and a Z–P curve. Every substitution is written out step by step.

## How to use

1. Pick a calculation: ideal gas, combined gas law, density, partial pressure / over water, or van der Waals
2. Choose the unknown, enter the known values and their units (or tap a preset such as STP or SATP)
3. Read the result, its conversions to other units and the full working, and copy what you need

## Features

- Solve PV = nRT for P, V, n or T with 7 pressure units, 3 volume units and K/°C/°F
- Enter n as moles or as mass plus a chemical formula; R shown in matching units
- Combined gas law with Boyle's, Charles's, Gay-Lussac's and Avogadro's laws
- Gas density ρ = PM/RT and molar mass from measured density, compared with air
- Dalton's law for editable mixtures, with dry air and heliox presets
- Gas collected over water with a 0–100 °C water vapour pressure table (IAPWS-IF97)
- Van der Waals equation for 20+ gases: real vs ideal, compressibility Z, critical constants and a Z–P chart
- STP (22.414 L/mol) vs SATP (24.79 L/mol) explained, with full step-by-step working

## FAQ

### Why is the molar volume of a gas 22.4 L/mol?

That is the volume of 1 mol of ideal gas at 0 °C (273.15 K) and 1 atm (101325 Pa): V = RT/P = 8.314462618 × 273.15 / 101325 ≈ 0.022414 m³ = 22.414 L. Since 1982 IUPAC has defined standard pressure as 1 bar, which gives 22.711 L/mol at 0 °C, while SATP (25 °C, 1 bar) gives 24.790 L/mol. Real gases deviate slightly.

### What units do I use in PV = nRT?

Temperature must be absolute, T(K) = t(°C) + 273.15. Pressure and volume must match the value of R: with R = 8.314 J/(mol·K) use Pa and m³; with 0.08206 L·atm/(mol·K) use atm and L; with 8.314 kPa·L/(mol·K) use kPa and L. The calculator converts everything for you and shows R in the units you picked.

### Why subtract water vapour pressure for gas collected over water?

Gas collected by displacing water is saturated with water vapour. With the water levels equal inside and outside, the total pressure equals atmospheric pressure: P(atm) = p(gas) + p(H₂O). At 22 °C water's vapour pressure is about 2.645 kPa, so 250 mL of hydrogen collected at 100.5 kPa has a dry partial pressure of 97.855 kPa and n = pV/(RT) ≈ 0.00997 mol.

### What do a and b mean in the van der Waals equation, and what does Z tell me?

In (P + an²/V²)(V − nb) = nRT, a corrects for attractions between molecules and b for the volume the molecules themselves occupy. The compressibility factor Z = PV/(nRT) equals 1 for an ideal gas; Z < 1 means attractions dominate and Z > 1 means molecular size dominates. For 1 mol of CO₂ in 0.5 L at 300 K, the ideal pressure is about 49.9 bar but the van der Waals pressure is about 40.0 bar, so Z ≈ 0.80.

## Related tools

- [Significant Figures Calculator](https://qilingtools.com/en/math/significant-figures): Free online sig fig calculator: count significant figures digit by digit, round to N sig figs or decimals with six rounding modes, and compute by sig fig rules.
- [Chemical Equation Balancer](https://qilingtools.com/en/math/chemical-equation): Balance chemical equations by the algebraic method: smallest whole-number coefficients, brackets, hydrates, ionic charges, electrons, atom and charge checks.
- [Molar Mass Calculator](https://qilingtools.com/en/math/molar-mass): Molar mass of any formula with IUPAC atomic weights: brackets and hydrates, mass percent of each element, grams ↔ moles ↔ particles and solution molarity.
- [Interactive Periodic Table](https://qilingtools.com/en/math/periodic-table): Interactive periodic table of all 118 elements: colour by category, block, electronegativity, atomic mass, phase or melting point; search and click for details.
- [pH Calculator](https://qilingtools.com/en/math/ph): Free pH calculator for strong and weak acids and bases, polyprotic acids, salts and buffers, with an exact charge-balance solution and species plots.
- [Titration Curve](https://qilingtools.com/en/math/titration): Free acid-base titration curve simulator: exact curves for strong, weak and polyprotic acids and bases, equivalence-point pH, the jump and indicator picks.
- [Solution & Dilution Calculator](https://qilingtools.com/en/math/solution): Free dilution calculator: solve C1V1=C2V2, convert molarity, % w/w, ppm and molality, mix solutions, plan serial dilutions and dilute stock acids.
- [Stoichiometry & Limiting Reagent](https://qilingtools.com/en/math/stoichiometry): Balances the equation, finds the limiting reactant from grams, moles, gas volume or molarity, and gives theoretical yield, excess and percent yield with steps.
