March 26, 20264 min read

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.

ideal gas law PV=nRT gas chemistry calculator calchub
Ad 336x280

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

VariableSymbolCommon Units
PressurePatm, kPa, mmHg, bar, psi
VolumeVL, mL, m³
Molesnmol
Gas constantR0.08206 L·atm/(mol·K)
TemperatureTK (must be Kelvin, not °C)
The gas constant R has different numerical values depending on which pressure and volume units you use. The calculator picks the right value automatically.

How to Use It

  1. Open the Ideal Gas Calculator.
  2. Enter any three of P, V, n, and T.
  3. Select the units for each — mix and match as needed.
  4. The tool solves for the missing variable and shows the unit-corrected working.
Temperature note: Always enter temperature in Kelvin. K = °C + 273.15. If you enter Celsius, the calculator converts it — but double-check, because using 25 instead of 298 K is a common and costly mistake.

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
ScenarioInputResult
Gas at STP, 1 molP=1 atm, n=1, T=273 KV = 22.4 L
Inflate tire (25°C, 0.3 mol, 5 L)n=0.3, T=298 K, V=5 LP = 1.47 atm
Hot gas (100°C vs 25°C, constant PV)T₁=373 K, T₂=298 Kn 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₂)
For more accurate results under non-ideal conditions, use the van der Waals equation, which the calculator also supports in an advanced mode.

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
Ad 728x90