What Is the Ideal Gas Law and How Do You Calculate It?
The ideal gas law is the equation of state PV = nRT that relates a gas's pressure, volume, amount, and temperature under the assumption it behaves as an ideal gas — one whose molecules have negligible volume and exert no intermolecular forces. It combines Boyle's, Charles's, and Avogadro's laws into a single equation, first stated in this form by Émile Clapeyron in 1834.
In the formula, P is pressure (atmospheres), V is volume (liters), n is the amount of gas (moles), R is the universal gas constant — 0.0821 L·atm/(mol·K), or 8.314 J/(mol·K) in SI units — and T is absolute temperature (kelvin). Given any three of the four quantities, the ideal gas law solves for the fourth.
At standard temperature and pressure (STP: 0°C and 1 atm), one mole of an ideal gas occupies 22.4 liters — a constant used throughout general chemistry to convert between moles and gas volume without weighing a sample.
How to Use This Ideal Gas Law Calculator
Choose which quantity you want to solve for, then enter the other three values in whatever units you have on hand — the calculator converts everything to atmospheres, liters, and kelvin before applying PV = nRT.
- Pressure: Accepts atm, kPa, mmHg (torr), psi, or bar — useful whether you're working from a US gauge in psi or a lab manometer in mmHg.
- Volume: Accepts liters, milliliters, cubic meters, or cubic feet, covering both lab glassware and industrial tank sizes.
- Amount of Gas (n): The number of moles of gas present — convert from grams using the substance's molar mass first if you only know mass.
- Temperature: Accepts kelvin, Celsius, or Fahrenheit. The calculator converts to kelvin internally since the ideal gas law requires an absolute temperature scale.
This calculator works with metric units common in chemistry labs (atm, L, °C) and US customary units common in engineering contexts (psi, ft³, °F) side by side, so results are useful whether you're a student solving a textbook problem or an engineer sizing a compressed-gas system.
How Do the Individual Gas Laws Compare?
The ideal gas law is a combination of four simpler laws, each of which holds two of the four variables constant. The table below shows how each relates to PV = nRT.
| Law | Formula | Held Constant | Discovered |
|---|---|---|---|
| Boyle's Law | P₁V₁ = P₂V₂ | Temperature, moles | Robert Boyle, 1662 |
| Charles's Law | V₁/T₁ = V₂/T₂ | Pressure, moles | Jacques Charles, 1787 |
| Gay-Lussac's Law | P₁/T₁ = P₂/T₂ | Volume, moles | Joseph Gay-Lussac, 1808 |
| Avogadro's Law | V₁/n₁ = V₂/n₂ | Pressure, temperature | Amedeo Avogadro, 1811 |
According to the National Institute of Standards and Technology (NIST), the universal gas constant R has a fixed value of 8.31446 J/(mol·K), derived from the Boltzmann constant and Avogadro's number — the same constant this calculator uses, expressed as 0.0821 L·atm/(mol·K) for the units chemists most often work in.
Frequently Asked Questions
What is a real-life example of the ideal gas law?
A car tire is a common example: as ambient temperature rises, the air inside expands and pressure increases even though the tire's volume barely changes — exactly what PV = nRT predicts when V and n are held roughly constant and T increases.
How accurate is this ideal gas law calculator?
This calculator applies PV = nRT exactly, which is highly accurate for gases at normal pressures and temperatures. According to the kinetic theory of gases, it becomes less accurate at high pressure or low temperature, where intermolecular forces and molecular volume — both ignored by the ideal model — start to matter; real gases are better modeled with the Van der Waals equation under those conditions.
What is the difference between the ideal gas law and Boyle's Law?
Boyle's Law is a special case of the ideal gas law that only applies when temperature and the amount of gas are held constant, leaving pressure and volume inversely proportional. The ideal gas law is the general equation that lets all four variables — pressure, volume, moles, and temperature — change at once.
What value of R should I use?
Use 0.0821 L·atm/(mol·K) when working in atmospheres and liters, 8.314 J/(mol·K) when working in SI pressure (pascals) and cubic meters, or 62.36 L·mmHg/(mol·K) when pressure is measured in millimeters of mercury. This calculator handles the unit conversion automatically regardless of which units you enter.