Ideal Gas Law Calculator — PV = nRT
Scope and assumptions: This calculator applies the ideal gas model PV = nRT for uniform, well-mixed gases at equilibrium. Use SI units: P in Pa, V in m³, n in mol, T in K, and R = 8.314462618 J/(mol·K). Assumes ideal behavior (low to moderate pressure, sufficiently high temperature), negligible interactions, and no phase change.
Variables and units
- P: Pressure [Pa]
- V: Volume [m³]
- n: Amount of substance [mol]
- T: Absolute temperature [K]
- R: Universal gas constant [8.314462618 J/(mol·K)]
Governing equations
- P = n R T / V
- V = n R T / P
- n = P V / (R T)
- T = P V / (n R)
Dimensional check: [P]·[V] = (Pa)(m³) = J; [n R T] = (mol)(J/(mol·K))(K) = J. Dimensions balance.
How to use the calculator
- Select which variable to solve for (P, V, n, or T).
- Enter the other three quantities in SI units. Keep R as default unless you explicitly change units consistently.
- Calculate. If a required input is zero or missing (e.g., V = 0), the tool flags an error.
Worked example (sanity check)
Problem: 1 mol of gas at T = 273.15 K occupying V = 0.022414 m³. Find P.
Inputs: n = 1 mol; T = 273.15 K; V = 0.022414 m³; R = 8.314462618 J/(mol·K).
Compute: P = n R T / V = (1)(8.314462618)(273.15) / 0.022414 ≈ 101324.997 Pa.
Result: P ≈ 1.01325 × 10^5 Pa (≈ 1 atm). This matches the reference example and provides a quick validation.
Model validity and limits
- Good regimes: low to moderate pressures (roughly P ≲ a few bar), temperatures well above condensation, monatomic or light diatomic gases behave closest to ideal.
- Breakdown indicators: high pressure, low temperature near saturation, strong intermolecular forces (e.g., polar gases), or very high densities. Consider real-gas corrections (van der Waals, virial) in these cases.
- Temperature must be absolute (K). Converting: T[K] = T[°C] + 273.15.
- Avoid mixed units (e.g., P in atm with R in SI). If using P in atm and V in L, use R ≈ 0.082057 L·atm/(mol·K) and keep all terms consistent.
Common pitfalls
- Using gauge pressure instead of absolute pressure. Use absolute P; add atmospheric pressure to gauge measurements if necessary.
- Not converting mL ↔ L ↔ m³: 1 L = 1e-3 m³.
- Rounding too early; carry full precision through the calculation, round at the end.
- Zero or near-zero divisors: V → 0 for P, P → 0 for V, n → 0 for T; these are non-physical or undefined in this model.
Quick checks
- Proportionalities: At fixed n and V, P ∝ T; doubling T doubles P. At fixed n and T, P ∝ 1/V; halving V doubles P.
- Energy scale: P V should be on the order of n R T (units of joules).
References
- CODATA 2018: R = 8.314462618 J/(mol·K).
- Standard conditions: 1 atm ≈ 101325 Pa; STP molar volume ≈ 22.414 L for ideal gas at 273.15 K and 1 atm.
Note: Educational guidance only; not a substitute for professional engineering review or laboratory safety protocols.