Science

Ideal Gas Law Calculator

Solve PV = nRT for any variable. Supports multiple units for pressure (atm, kPa, mmHg, bar, psi), volume (L, mL, m³), and temperature (K, °C, °F).

Quick Answer

PV = nRT where R = 0.08206 L·atm/(mol·K). Enter any 3 of pressure, volume, moles, and temperature to solve for the 4th.

Calculate

Select which variable to solve for, then enter the three known values with appropriate units.

Presets:
mol
Pressure
0.99999418 atm
Volume
22.414 L
Moles
1 mol
Temperature
273.15 K
Molar Density
0.04461497 mol/L
Temperature (K)
273.15 K

Gas Constant R — Common Values

ValueUnits
0.08206L·atm/(mol·K)
8.314J/(mol·K)
8.314kPa·L/(mol·K)
62.36L·mmHg/(mol·K)
1.987cal/(mol·K)
0.08314L·bar/(mol·K)

About This Tool

The Ideal Gas Law Calculator solves the equation PV = nRT for any one of the four variables: pressure (P), volume (V), amount in moles (n), or temperature (T). It supports multiple unit systems for each variable, handling all conversions internally so you can work in whichever units are most convenient for your problem. The gas constant R = 0.08206 L·atm/(mol·K) is used as the base, with automatic unit conversion for all inputs and outputs.

The Ideal Gas Law Explained

The ideal gas law PV = nRT is one of the most important equations in chemistry and physics. It relates four macroscopic properties of a gas: pressure, volume, amount (in moles), and temperature. The equation assumes the gas is "ideal" meaning molecules are point particles with no volume that experience no intermolecular attractive or repulsive forces. While no real gas is truly ideal, most gases behave ideally enough at moderate temperatures and pressures for this equation to be extremely useful.

Historical Development

The ideal gas law combines three empirical gas laws discovered over two centuries. Boyle's Law (1662) established that pressure and volume are inversely proportional at constant temperature (PV = constant). Charles's Law (1787) showed that volume and temperature are directly proportional at constant pressure (V/T = constant). Avogadro's Law (1811) demonstrated that volume and amount are directly proportional at constant temperature and pressure (V/n = constant). Combining these three proportionalities with the gas constant R yields PV = nRT.

Unit Conversions

One of the most common sources of error in gas law calculations is unit inconsistency. This calculator supports five pressure units (atm, kPa, mmHg, bar, psi), three volume units (L, mL, m³), and three temperature scales (K, °C, °F). All conversions happen automatically. The key requirement is that temperature must ultimately be in Kelvin for the equation to work, since Kelvin is the only absolute temperature scale. Using Celsius or Fahrenheit directly would produce incorrect results.

STP and Molar Volume

At Standard Temperature and Pressure (STP: 273.15 K, 1 atm), one mole of an ideal gas occupies 22.414 liters. This molar volume is a fundamental constant in gas chemistry and is used extensively in stoichiometric calculations involving gases. At room temperature (25°C, 298.15 K) and 1 atm, the molar volume increases to about 24.47 liters. The preset buttons in this calculator load these standard conditions for quick reference and verification.

Real Gases and Limitations

The ideal gas law works well for gases like nitrogen, oxygen, hydrogen, and noble gases at ordinary conditions. It becomes inaccurate at high pressures (where molecular volume becomes significant compared to the container), low temperatures (near the boiling point, where intermolecular forces cause deviations), and for polar molecules like water vapor or ammonia. For more accurate calculations under non-ideal conditions, the van der Waals equation, Redlich-Kwong equation, or Peng-Robinson equation of state should be used instead.

Practical Applications

Engineers use the ideal gas law to design gas storage systems, calculate fill pressures for cylinders, and predict gas behavior in engines and turbines. Chemists use it to determine gas volumes in reactions, calculate molar masses from gas density measurements, and design gas-phase synthesis procedures. In meteorology, it helps explain atmospheric pressure, weather patterns, and balloon behavior. In medicine, it underlies the physics of ventilation, anesthesia delivery, and hyperbaric oxygen therapy.

Frequently Asked Questions

What is the ideal gas law?
The ideal gas law is PV = nRT, where P is pressure, V is volume, n is the number of moles, R is the ideal gas constant (0.08206 L*atm/(mol*K)), and T is temperature in Kelvin. It describes the behavior of an 'ideal' gas where molecules have no volume and no intermolecular forces. Real gases approximate this behavior at low pressures and high temperatures. The equation combines Boyle's Law (P inversely proportional to V), Charles's Law (V proportional to T), and Avogadro's Law (V proportional to n) into a single relationship.
What is the value of the gas constant R?
The gas constant R has different values depending on the units used. The most common values are: R = 0.08206 L*atm/(mol*K) for pressure in atm and volume in liters; R = 8.314 J/(mol*K) for SI units; R = 62.36 L*mmHg/(mol*K) for pressure in mmHg; R = 8.314 kPa*L/(mol*K) for pressure in kPa. This calculator uses R = 0.08206 L*atm/(mol*K) internally and converts all inputs to compatible units before computing.
What is STP and what volume does one mole of gas occupy?
STP stands for Standard Temperature and Pressure: 0 degrees Celsius (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of an ideal gas occupies exactly 22.414 liters, known as the molar volume. This value comes directly from PV = nRT: V = (1 mol)(0.08206)(273.15 K) / (1 atm) = 22.414 L. IUPAC updated the standard pressure to 1 bar (100 kPa) in 1982, giving a molar volume of 22.711 L, but many textbooks still use the older 1 atm standard.
When does the ideal gas law not work well?
The ideal gas law becomes inaccurate at high pressures (above ~10 atm) and low temperatures (near a gas's boiling point), where intermolecular forces and molecular volumes become significant. For more accurate results under these conditions, use the van der Waals equation: (P + a*n^2/V^2)(V - nb) = nRT, where a and b are gas-specific constants. Polar molecules (like water vapor) and large molecules deviate more from ideal behavior than small nonpolar molecules (like helium or nitrogen).
How do I convert between temperature units for this calculator?
The ideal gas law requires temperature in Kelvin (absolute temperature). To convert: Kelvin = Celsius + 273.15; Celsius = Kelvin - 273.15; Kelvin = (Fahrenheit - 32) * 5/9 + 273.15. This calculator handles conversions automatically — select your preferred temperature unit from the dropdown. Important: never use Celsius or Fahrenheit directly in PV = nRT without converting to Kelvin first, as negative temperatures would give nonsensical results.
What are the common applications of the ideal gas law?
The ideal gas law is used in countless applications: calculating the volume of gas produced in chemical reactions, determining the amount of gas in a container (like a compressed gas cylinder), predicting how gases behave when heated or pressurized (like in car tires or weather balloons), designing HVAC systems, understanding atmospheric pressure and weather patterns, and calculating gas densities. In medicine, it helps calculate ventilator settings and anesthesia gas mixtures. In engineering, it is used for designing combustion engines and industrial gas systems.

Was this tool helpful?