PV = nRT

The ideal gas law has been developed from both an empirical approach and by building up a picture of gas particles from first principles in physics – the statistical mechanics approach.

It is extremely useful, but it does have limitations, which we'll discuss at the end of this section. Gases aren't ideal, but many are ideal enough under the right conditions that the ideal gas law gives us the right results.

In developing the ideal gas law, we make the following assumptions that you should bear in mind while using it:

  1. Gases consist of spherical particles so small the distance between gas particles (atoms or molecules) is always much greater than the size of the particle.
  1. The gas particles have the same mass.
  2. The number of molecules is so large that an average over, say particle speed, is meaningful.

  3. The particles are in constant motion, and undergo perfectly elastic collisions with other particles and with the walls of the container. Interactions, especially attraction, between particles is negligible (i.e. they exert no forces on one another).

  4. The temperature of the gas depends on the average kinetic energy of the particles.

  5. The time between collisions with the container walls is smaller than the time between collisions with other particles.


An empirical rule or law is one that is based on experiment and observation instead of pure mathematical logic. Empirical observations inform theoretical investigations, and theory invites experiment in order to confirm, disprove or improve the theory.


Statistical mechanics

In the field of statistical mechanics ("stat-mech"), we begin by considering the physics of small particles and their interactions, and then expand that behavior over large ensembles (groups) of particles using ideas from probability and statistics.

The ideal gas law

The ideal gas law takes two forms, an atomic/molecular form (top), and a molar form (bottom).

N is the number of particles (atoms or molecules) and k = 1.381 × 10-23 J/K is the Boltzmann constant.

n is the number of moles of a gas and R = 8.314 J/mol·K is the molar gas constant in SI units.


SI Units

SI stands for Le Système International d'Unités (French), or International System of Units.

It is a standardized system of physical units based on the meter (m), kilogram (Kg), second (s), ampere (A), Kelvin (K), candela (cd), and mole (mol), along with a set of prefixes to indicate multiplication or division by a power of ten.

Units and the molar gas law

When using the molar gas law, PV = nRT, you have some choices of units. The SI unit of volume is the cubic meter (m3), but that unit can be cumbersome, and the use of liters as a unit of gas volume is often favored. Likewise, the SI unit of pressure is the Pascal (Pa), but the atmosphere (1 atm = 101,325 Pa) is used more frequently in some fields

You can adapt to the set of units you'd like to use just by changing the gas constant. Here are the constants and the units of pressure, temperature and volume that go with them. While, when using gas laws like Charles' law and the Gay-Lussac law, it's OK to use Celsius temperatures (because they appear in ratios where the units cancel), it's important to use Kelvin temperatures in the ideal gas law.

R = 8.314 J·mol-1K-1

P in Pascals (Pa)

V in cubic meters (m3)

T in Kelvin

R = 0.0821 liter·atm·mol-1K-1

P in atmospheres (atm)

V in liters (L)

T in Kelvin

Examples – using the ideal gas law

Example 1

How many moles of gas must be present in a gas cylinder of volume 0.01 m3 pressurized to 200 KPa at a temperature of 25˚C?

Solution: Our units are mostly SI, so we should use the gas constant R = 8.314 J·mol-1K-1, and convert the temperature to Kelvin: T = (273 + 25) = 298 K.

Now we rearrange the ideal gas law to solve for the number of moles. Do the rearrangement first so that we can plug numbers and units into the result an know we're on the right track:

The result is:

About the units ...

Hopefully, you're wondering about how those units magically worked out to give us moles. Here is that equation (PV/RT) again, but this time just with units. Pascals have been expanded to their base SI units, 1Pa = 1 Kg·m-1·s-2, and Joules likewise, 1 J = 1 Kg·m2·s-2.

Like units have been canceled with a different color: Kg in red, meters in blue, and so on. See if you can follow the cancellations. We end up with 1/(1/moles), which is moles. Tada!

Example 2

Calculate the temperature (in ˚C) of 3.5 moles of a gas at a pressure of 9.3 atm contained in a 10.0 liter cylinder.

Solution: We want temperature, so we need to first rearrange the ideal gas law to solve for temperature:

Now our units of pressure and volume are atmospheres and liters, so using R = 0.0821 liter·atm·mol-1K-1is the best way to go.

Plugging the numbers in, we get:

See if you can follow the unit cancellation. Units will always tell you if you're on the right (or wrong) track. So the temperature is:

We converted to Celsius by subtracting 0˚C = 273K.

Example 3

A 1-liter water bottle is emptied and sealed on the top of a 14,000 ft. peak, at a temperature of 15˚C. At 14,000 ft., the air pressure is about 0.59 atm. (a) Calculate the number of moles of air (assume that "air" is an ideal gas). At sea level, the bottle is observed to have collapsed. This collapse is due to the difference between the outside air pressure at sea level (P = 1 atm.) and the low pressure inside the bottle. (b) Using this information, calculate the volume of the bottle at sea level.

Solution: For part (a), we'll rearrange PV = nRT to find the number of moles:

Plugging in the information,


Now for part (b) we want the volume from PV = nRT:

Plugging in the new pressure and the rest of the information gives us:

So the bottle loses almost half of its volume in descending to sea level from 14,000 ft.

There is another way of getting to this result, and it's somewhat simpler. Consider that the PV product for each state (high and low altitude) are given by these ideal-gas equations:

Because nRT is the same for both, we can use the transitive property to equate the PV products

... which is really just Boyle's law. It can be rearranged to find the final volume like this:

Then we see that the final volume is just the ratio of the pressures multiplied by the initial volume

... which gives the same result.


In chemistry, we abbreviate a common set of conditions "STP," which stands for "standard temperature and pressure."

At STP, T = 273.15 K (0˚C)   and   P = 1 atm = 101,325 Pa = 101.325 KPa.

You should memorize the meaning of STP; it's used very frequently.

Example 4

What volume does one mole of gas occupy at STP?


As usual, we'll rearrange the ideal gas law to solve for volume:

Plugging in n = 1 mole, T = 273.15 K and P = 1 atm (and the appropriate gas constant, R = 0.0821 L·atm/mol·K), we get

The result is an important number, called the molar gas volume. One mole of any well-behaved (ideal) gas occupies this volume at STP:

Molar gas volume

The volume of 1 mole of any gas at STP is 22.4 liters. This volume can vary if the gas or the conditions lead to non-ideal behavior.

Practice problems

  1. To what volume must 2.5 moles of nitrogen gas (N2) be compressed in order to achieve a final pressure of 500 KPa at T = 300 K ?

  2. The circumference of a basketball is 30 inches and it is inflated to a pressure of 8 pounds per square inch (psi) at room temperature (298 K). How much air (in moles) is in a properly inflated basketball ? [Hint: 1 atm. = 14.7 psi, and 1 inch = 2.54 cm].

  3. Calculate the pressure, in Pa, of 25 moles of gas compressed into a volume of 1 liter at T = 298 K.

  4. Two gas cylinders are connected by a valve, as shown. The volume of cylinder 1 is 24 L, and the volume of cylinder 2 is 18 L. If cylinder A contains 1.1 moles of gas at T = 300K and the valve is opened: (a) Calculate the pressure of the two cylinders together after their temperature is stabilized at 300K, and (b) What will happen if valve B is opened?

  5. Two gas cylinders are connected by a valve, as in the drawing above. The first cylinder, which has a volume of 24 L, contains 12 moles of argon (Ar) gas at 12.3 atm. of pressure. Calculate the temperature of the gas in that cylinder. Now let's open the valve between the two cylinders, joining the 24 L tank to the second tank of volume 18 L. Now calculate the temperature of the gas after it has been expanded into the larger volume.

  6. A commercial cylinder of Neon (Ne) is pressurized to 151 atm. The cylinder has a diameter of 11.75 cm and a height of 140 cm. Calculate the mass (in Kg) of Ne in such a tank, assuming a constant temperature of 298 K. Unless the cylinder is pumped out with a vacuum pump, some residual gas will remain inside when it is "empty." How much gas, in grams, will remain in the tank when it's "empty" ?

  7. Let's say you need a source of O2 gas that has a pressure of at least 20 atm. If you are limited to batches of 1.5 Kg of O2, what minimum volume of tank will you need to achieve that pressure at room temperature (298 K) ?

  8. What mass of krypton (Kr) gas is in a container of volume V = 0.22 m3 at a temperature of 20˚C and a pressure of 500 KPa ? Would you expect this calculation to be more or less accurate if you changed the gas to helium (He) ?


Download solutions

Solutions not available yet ... stay tuned.

Non-ideal behavior

Sometimes our assumptions of ideality break down and we have to consider the effects of those non-idealities on our calculations using the ideal gas law. A good place to start thinking about them is with the assumptions we made in the first place.

The first was that gases are spherical, basically have no size, and that the distance between them is much larger than the particle size. We know that this is not strictly true. some gases like CO2, water (H2O) and methane (CH4) are linear or bent or three-dimensional.

And for some gases, the attraction between "particles" is actually quite large, particularly at high pressure when the distance between them is significantly reduced. CO2, for example, actually liquefies at room temperature and pressures above about 100 atm – definitely not ideal gas behavior.

The second and third assumptions (see list at the top of this page) don't usually cause too much of a problem, but the fourth, that collisions with the walls of the container are perfectly-elastic, can be a problem. Sometimes gas atoms or molecules can be attracted to the walls of the container, causing energy (but not momentum) to be lost in collisions.

Finally, the sixth assumption, that collisions with the container walls are more frequent than collisions with other atoms or molecules, begins to break down when particles are large or pressures are high.

The essential root of all of the possible breakdowns of our ideal gas assumptions is that molecules actually do have size and they can exert attractive forces on each other and the walls of their container.

There are other models and patches to the ideal gas law that we can use when the ideal approximation breaks down. Those are discussed in another section.

Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2016, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.