Ideal Gas Law Calculator
Calculate pressure, volume, moles, or temperature of an ideal gas using PV = nRT.
What the Ideal Gas Law Assumes
The equation PV = nRT is exact for a gas whose molecules have zero volume and no attraction to each other. No real gas satisfies either condition, but at ordinary temperatures and pressures both assumptions are close enough that the law works remarkably well.
| Value of R | Units | Use when |
|---|---|---|
| 0.08206 | L·atm/(mol·K) | Pressure in atm, volume in litres |
| 8.314 | J/(mol·K) | SI units, pressure in Pa, volume in m³ |
| 62.36 | L·mmHg/(mol·K) | Pressure in mmHg or torr |
| 0.08314 | L·bar/(mol·K) | Pressure in bar |
Choosing R to match your pressure and volume units is the whole trick. Temperature is always kelvin regardless — the law involves absolute temperature because at 0 K molecular motion ceases entirely and the equation must give zero volume.
Molar Volume and Standard Conditions
| Condition | Temperature | Pressure | Molar volume |
|---|---|---|---|
| STP (IUPAC, current) | 273.15 K (0°C) | 1 bar | 22.71 L/mol |
| STP (older definition) | 273.15 K (0°C) | 1 atm | 22.41 L/mol |
| SATP | 298.15 K (25°C) | 1 bar | 24.79 L/mol |
| Room conditions | 293.15 K (20°C) | 1 atm | 24.06 L/mol |
The familiar 22.4 L/mol figure uses the older 1 atm definition. IUPAC changed the standard pressure to 1 bar in 1982, which gives 22.71 L/mol — a 1.3% difference that matters in careful work and causes confusion when textbooks of different vintages disagree.
Where It Breaks Down
| Condition | What fails | Direction of error |
|---|---|---|
| High pressure | Molecular volume no longer negligible | Real volume larger than predicted |
| Low temperature | Intermolecular attraction significant | Real volume smaller than predicted |
| Near condensation | Both effects, plus phase change | Law fails entirely |
| Polar gases (NH3, H2O) | Strong dipole attraction | Deviation at moderate conditions |
The van der Waals equation corrects both effects with two parameters: a for intermolecular attraction and b for excluded molecular volume. At everyday conditions those corrections are small, which is why the ideal law survives as the everyday tool.
Worked Examples
Common Mistakes
The law requires absolute temperature. Using 25 instead of 298 gives an answer wrong by more than a factor of ten, and negative Celsius values produce nonsense.
R = 0.08206 requires atm and litres; R = 8.314 requires pascals and cubic metres. Mixing them is the most frequent error in gas calculations.
That value holds only at 0°C and 1 atm. At room temperature the molar volume is about 24 L/mol, and IUPAC's current STP definition gives 22.71.
Close to the boiling point, attractive forces dominate and the gas is about to liquefy. Neither assumption behind the law survives there.
Frequently Asked Questions
Formula Explorer connections
Interpretation: PV=nRT balances mechanical state (pressure and volume) with thermal state and amount. Holding two quantities fixed produces Boyle’s, Charles’s or Avogadro’s law. Assumption: particles have negligible volume and intermolecular forces; accuracy declines at high pressure and low temperature.