Ideal Gas Calculator — PV = nRT Solver for Pressure, Volume, and Temperature
Solve the ideal gas law PV = nRT for any variable. Find pressure, volume, moles, or temperature of a gas with unit flexibility and worked examples.
The ideal gas law ties together four properties of a gas into one clean equation. Once you know three of them, the fourth is just algebra — but keeping track of units (especially R, the gas constant) is where things get messy. The CalcHub Ideal Gas Calculator handles PV = nRT in any direction, with automatic unit conversion so you don't have to memorize which value of R to use.
The Equation
PV = nRT
| Variable | Symbol | Common Units |
|---|---|---|
| Pressure | P | atm, kPa, mmHg, bar, psi |
| Volume | V | L, mL, m³ |
| Moles | n | mol |
| Gas constant | R | 0.08206 L·atm/(mol·K) |
| Temperature | T | K (must be Kelvin, not °C) |
How to Use It
- Open the Ideal Gas Calculator.
- Enter any three of P, V, n, and T.
- Select the units for each — mix and match as needed.
- The tool solves for the missing variable and shows the unit-corrected working.
Worked Examples
How many liters does 2 mol of gas occupy at STP (0°C, 1 atm)? V = nRT/P = 2 × 0.08206 × 273.15 / 1 = 44.8 L(Standard molar volume is 22.4 L/mol, so 2 mol = 44.8 L — checks out.)
What pressure does 0.5 mol of gas exert in a 10 L container at 25°C? P = nRT/V = 0.5 × 0.08206 × 298.15 / 10 = 1.22 atm| Scenario | Input | Result |
|---|---|---|
| Gas at STP, 1 mol | P=1 atm, n=1, T=273 K | V = 22.4 L |
| Inflate tire (25°C, 0.3 mol, 5 L) | n=0.3, T=298 K, V=5 L | P = 1.47 atm |
| Hot gas (100°C vs 25°C, constant PV) | T₁=373 K, T₂=298 K | n ratio = 1.25× |
Limitations of the Ideal Gas Model
The ideal gas law assumes molecules have no volume and no intermolecular attractions. In practice:
- High pressure → molecules are close together, their volume matters
- Low temperature → intermolecular forces become significant
- Heavy/polar gases (CO₂, NH₃) deviate more than light nonpolar ones (He, H₂)
Tips
- STP vs. SATP: STP is 0°C (273.15 K) and 1 atm — molar volume 22.4 L/mol. SATP is 25°C and 100 kPa — molar volume 24.8 L/mol. They're different; check which your textbook uses.
- Combined gas law for changing conditions: P₁V₁/T₁ = P₂V₂/T₂ (n constant). The calculator has a combined gas law mode for before/after scenarios.
Why must temperature be in Kelvin?
Because the ideal gas law requires an absolute temperature scale. Celsius and Fahrenheit have arbitrary zeros that would make the equation meaningless. Kelvin starts at absolute zero (no thermal motion), making V and P directly proportional to T.
Does the ideal gas law apply to mixtures?
Yes, through Dalton's Law of Partial Pressures. Each gas in a mixture behaves independently, so you can apply PV = nRT separately for each component. Total pressure = sum of partial pressures.
How accurate is ideal gas for room-temperature air?
Very accurate — air at ambient conditions behaves nearly ideally. The deviations are less than 0.1% at 1 atm and room temperature. You'd only need the van der Waals correction for high-pressure industrial processes or liquefaction scenarios.
Related calculators: Boiling Point Calculator · Stoichiometry Calculator · Concentration Converter