Ideal Gas Law Calculator (PV = nRT)
Solve for P (pressure), V (volume), T (temperature), or n (moles) using the ideal gas equation. Enter any three variables, choose units, and we’ll compute the fourth with clear unit conversions and steps.
Background
The ideal gas law relates macroscopic properties of a gas: PV = nRT, where R is the gas constant. This calculator converts inputs to SI (Pa, m³, K, mol), solves, and then reports the answer in your chosen unit.
How to use this calculator
- Select the variable to solve for (P, V, T, or n).
- Enter the other three values using your preferred units.
- We convert to SI (Pa, m³, K, mol), solve, and convert back.
Gas constant: R = 8.314462618 J·mol⁻¹·K⁻¹ (Pa·m³·mol⁻¹·K⁻¹). 1 atm = 101325 Pa; 1 bar = 1×10⁵ Pa; 1 kPa = 1000 Pa; 1 torr ≈ 133.322 Pa; 1 L = 1×10⁻³ m³.
Example Problems & Step-by-Step Solutions
Example 1 (Volume at STP)
Given P = 1 atm, T = 273.15 K, n = 1.00 mol. V = nRT / P = 1×0.082057×273.15 ≈ 22.414 L.
Example 2 (Pressure)
Given V = 10.0 L, n = 0.400 mol, T = 25 °C (298.15 K). P = nRT / V ≈ 0.400×0.082057×298.15 / 10.0 ≈ 0.977 atm.
Frequently Asked Questions
Q: Do I need R in different units?
No—inputs are converted to SI, solved with R = 8.314462618, then converted back to your units.
Q: Can I enter °C?
Yes—choose °C; we convert to K internally (T[K] = T[°C] + 273.15).
Q: When does the ideal gas law fail?
At high pressures/low temperatures where real-gas behavior (e.g., van der Waals) becomes important.