Discussing gas density is slightly more complex than discussing solid/liquid density. Since gas volume is VERY responsive to temperature and pressure, these two factors must be included in EVERY gas density discussion.

By the way, solid and liquid volumes are responsive to temperature and pressure, but the response is so little that it can usually be ignored in introductory classes.

So, for gases, we speak of "standard gas density." This is the density of the gas (expressed in grams per liter) at STP. If you discuss gas density at any other set of conditions, you drop the word standard and specify the pressure and temperature. Also, when you say "standard gas density," you do not need to add "at STP." STP is part of the definition of the term. It does no harm to say "standard gas density at STP," it's just a bit redundant.

You can calculate the standard gas density fairly easily. Just take the mass of one mole of the gas and divide by the molar volume.

For nitrogen, we would have:

28.014 g mol¯^{1}/ 22.414 L mol¯^{1}= 1.250 g/L

For water, we have:

18.015 g mol¯^{1}/ 22.414 L mol¯^{1}= 0.8037 g/L

You could see this: "ideal standard gas density" or some other variation that uses ideal in addition to standard. The behavior of "real" gases diverges from predictions based on ideal conditions. Small gases like H_{2} at high temperatures approach ideal behavior almost exactly while larger gas molecules (NH_{3}) at low temperatures diverge the greatest amount. These "real" gas differences are small enough to ignore right now, but in later classes they will become important.

The official IUPAC unit for gas density is kg/m^{3} (not g/L). However, it turns out that one kg/m^{3} equals one g/L. Here is a brief video explaining the conversion.

One place teachers like to bring gas density into play is when you calculate a molar mass of a gas using PV = nRT.

**Example #1:** The density of a gas is measured at 1.853 g / L at 745.5 mmHg and 23.8 °C. What is its molar mass?

**Solution #1:** Convert mmHg to atm and °C to K. Use 1.000 L. Plug into PV = nRT and solve for n. Then divide 1.853 g by n, the number of moles, for your answer.

(745.5/760) (1.000 L) = (n) (0.08206) (296.8 K)The (745.5/760) term converts mmHg to atm. Notice I left the units off everything.

n = 0.0402753 mol (I'll keep a couple guard digits.)

1.853 g / 0.0402753 mol = 46.01 g/mol

**Solution #2:** This solution exploits a rearrangement of the ideal gas law. Here it is:

molar mass = [(1.853 g / 1.000 L) (0.08206) (296.8)] / (745.5/760)

**Example #2:** What is the molar mass of a gas which has a density of 0.00249 g/mL at 20.0 °C and 744.0 mm Hg?

**Solution:** Convert mmHg to atm (744.0/760.0) and °C to K (20.0 + 273.15). Use 0.001 L (which is 1 mL converted to liters). Plug into PV = nRT and solve for n (the value of which is calculated to be 4.069 x 10¯^{5} mol).

Then, divide 0.00249 g by the moles just calculated for an answer of 61.2 g/mol.

Please note that I used 273.15 (rather than 273) for the Celsius to Kelvin conversion. Some teachers require the use of 273.15. The ChemTeam always felt that 273 was good enough, but some teachers disagree. Yours may be one of those people (Are teachers people?).

**Example #3:** Anhydrous aluminum chloride sublimes at high temperatures. What density will the vapor have at 225 degrees Celsius and 0.939 atm of pressure?

**Solution:**

1) Use PV = nRT to determine moles of gas present in vapor:

(0.939 atm) (1.00 L) = (n) (0.08206) (498 K)n = 0.0229776 mol

I assumed 1.00 L because gas densities are measured in g/L.

2) Get grams of AlCl_{3} in the calculated moles:

0.0229776 mol x 133.34 g/mol = 3.06 g (to three sig figs)

3) Get density:

3.06 g / 1.00 L = 3.06 g/LI could have assumed any volume I wanted back in the PV = nRT calc. However, I would have then divided the grams by that volume in this last step and wound up with 3.06.

**Example #4:** Air is a mixture of 21% oxygen gas and 79% nitrogen gas (neglect minor components and water vapor). What is the density of air at 30.0 °C and 1.00 atm?

Comment: For both solutions, we need the "molecular weight" of air:

MW(air) = (%O_{2}x MW_{O2}) + (%N_{2}x MW_{N2})(0.21 x 32) + (0.79 x 28) = 29 g/mol

**Solution #1:**

1) Use PV = nRT and assume 1.00 L:

(1.00 atm) (1.00 L) = (n) (0.08206) (303 K)n = 0.0402185 mol (of air at 303 K)

2) Calculate grams of air:

0.0402185 mol times 29 g/mol = 1.17 g

3) Determine density:

1.17 g / 1.00 L = 1.17 g/L

**Solution #2:**

1) Density of air at STP

29 g/mol divided by 22.4 L/ mol = 1.29383 g/L (I'll keep some guard digits

2) As air is heated it gets less dense, so apply a temperature correction which makes the density smaller:

d (g/L) = 1.29383 g/L x (273 K / 303 K) = 1.16 g/LThis is actually a disguised Charles' Law correction:

V_{1}/ T_{1}= V_{2}/ T_{2}(1.00 L / 273 K) = (x / 303 K)

x = 1.10989 L

1.29383 g / 1.10989 L = 1.16 g/L (to three sig figs)

If the problem had been written with a change in pressure from standard, we would have used the Combined Gas Law rather than Charles' Law.

**Example #5:** Two equal-volume balloons contain the same number of atoms. One contains helium and one contains argon. Comment on the relative densities of the balloons.

Here is a wrong answer: To determine density, you have to divide mass by volume. They are equal volume containers, and they contain the same number of atoms, then the densities of the balloons are equal."Response to wrong answer: The answer above would be right, if the two sets of atoms had identical weights. However, an atom of argon weighs more than an atom of helium.

Therefore, at a condition of equal numbers of atoms, the argon balloon would be the denser one.

Note the implied Avogadro's Hypothesis in this question: equal volumes of gas contain equal numbers of atoms. Therefore, they MUST be at equal pressure and equal temperature.