How to Use the Ideal Gas Law

Learn how to use the ideal gas law PV = nRT step by step. Covers pressure, volume, temperature, moles, the gas constant, and related gas laws with worked examples.

What Is the Ideal Gas Law?

The ideal gas law is a fundamental equation in chemistry and physics that relates the pressure, volume, temperature, and amount of an ideal gas. The equation is PV = nRT, where P is pressure, V is volume, n is the number of moles of gas, R is the universal gas constant, and T is the absolute temperature in Kelvin. An "ideal gas" is a theoretical gas whose molecules have no volume and exert no intermolecular forces. While no real gas is truly ideal, the ideal gas law provides an excellent approximation for most gases at moderate temperatures and pressures, making it one of the most widely used equations in science.

Understanding Each Variable

Pressure (P) is the force per unit area exerted by gas molecules colliding with the walls of their container, commonly measured in pascals (Pa), atmospheres (atm), or kilopascals (kPa). Volume (V) is the space the gas occupies, measured in liters (L) or cubic meters (m cubed). The number of moles (n) represents the amount of gas, where one mole contains approximately 6.022 times 10 to the 23rd molecules (Avogadro's number). Temperature (T) must always be in Kelvin: convert from Celsius by adding 273.15. The gas constant R has a value that depends on your choice of units; the most common values are 8.314 J/(mol*K) when using SI units, or 0.0821 L*atm/(mol*K) when using liters and atmospheres.

Solving for Any Variable

The ideal gas law can be rearranged to solve for any one of the four variables when the other three are known. To find pressure: P = nRT / V. To find volume: V = nRT / P. To find temperature: T = PV / (nR). To find moles: n = PV / (RT). Before plugging in values, make sure all units are consistent with your chosen value of R. If using R = 0.0821 L*atm/(mol*K), then pressure must be in atmospheres, volume in liters, and temperature in Kelvin. Unit mismatches are the most common source of errors in ideal gas law calculations.

Worked Example

Suppose you have 2.0 moles of an ideal gas at a temperature of 300 K in a container with a volume of 10.0 liters. What is the pressure? Using P = nRT / V with R = 0.0821 L*atm/(mol*K): P = (2.0 * 0.0821 * 300) / 10.0 = 49.26 / 10.0 = 4.93 atm. To convert to kilopascals, multiply by 101.325: 4.93 * 101.325 = 499.5 kPa. Always double-check that your answer is physically reasonable. A pressure of about 5 atm is moderate and makes sense for 2 moles of gas in a 10-liter container at room temperature.

Boyle's, Charles's, and Gay-Lussac's Laws

The ideal gas law encompasses three earlier gas laws as special cases. Boyle's law (P1*V1 = P2*V2) holds when temperature and moles are constant: pressure and volume are inversely proportional. Charles's law (V1/T1 = V2/T2) holds when pressure and moles are constant: volume is directly proportional to temperature. Gay-Lussac's law (P1/T1 = P2/T2) holds when volume and moles are constant: pressure is directly proportional to temperature. All three can be derived from PV = nRT by holding the appropriate variables constant. The combined gas law, P1*V1/T1 = P2*V2/T2, merges all three and is useful when a gas sample undergoes changes in pressure, volume, and temperature simultaneously.

Standard Temperature and Pressure (STP)

Standard Temperature and Pressure, or STP, is a reference condition used to compare gas measurements. The IUPAC definition sets STP at 0 degrees Celsius (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of an ideal gas occupies approximately 22.4 liters, a value known as the standard molar volume. This convenient benchmark allows chemists to quickly estimate volumes of gases produced or consumed in reactions without performing a full ideal gas law calculation every time. For example, if a reaction produces 3 moles of gas at STP, the volume is approximately 3 times 22.4 = 67.2 liters.

Limitations of the Ideal Gas Law

The ideal gas law breaks down under conditions where gas molecules interact significantly with each other or occupy a non-negligible fraction of the container volume. This typically occurs at very high pressures (where molecules are forced close together) and very low temperatures (where molecules move slowly and intermolecular attractions become important). Under these conditions, real gas behavior deviates from the ideal prediction, and more accurate equations of state like the Van der Waals equation are needed. The Van der Waals equation adds correction terms for intermolecular attractions and molecular volume: (P + a*n squared / V squared) * (V - n*b) = nRT.

Practical Applications

The ideal gas law is used extensively in chemistry, engineering, and atmospheric science. Chemists use it to determine the molar mass of unknown gases by measuring mass, pressure, volume, and temperature. Scuba divers rely on Boyle's law to understand how gas volume changes with depth. Automotive engineers apply Gay-Lussac's law to predict tire pressure changes as tires heat up during driving. Meteorologists use gas law relationships to model atmospheric pressure and weather patterns. In industrial settings, the law helps size storage tanks, design pressurized systems, and calculate gas flow rates in pipelines.

Try These Calculators

Put what you learned into practice with these free calculators.