Gas Density and Molar Mass

A gas trapped in a flask carries a hidden signature of its identity. That signature is a single measurable number: its density. Pressure, volume, and temperature all connect to moles through the The Ideal Gas Law. So measuring the mass of a known volume of gas at known PP and TT is enough. This recovers its molar mass. This turns a bench measurement into a chemical identification tool. The steps are simple: weigh a bulb, note the gauge pressure, read a thermometer. This article builds the density-molar mass relation directly from the ideal gas law. It shows why gas density behaves so differently from liquid or solid density. It also walks through two fully numeric determinations of molar mass from experimental data. The same reasoning under different pressures anticipates the Kinetic-Molecular Theory of Gases. There, molar mass reappears as the variable controlling how fast molecules move.

Key takeaways
  • Gas density depends on PP, TT, and molar mass MM, unlike liquid/solid density, which is nearly constant.
  • The master formula: d=PMRTd = \dfrac{PM}{RT}, derived directly from PV=nRTPV = nRT.
  • Rearranged, molar mass is recoverable from density: M=dRTPM = \dfrac{dRT}{P}.
  • Doubling pressure at fixed TT doubles gas density; doubling absolute temperature at fixed PP halves it.
  • A single mass/volume/PP/TT measurement on an unknown gas pins down its molar mass — no chemical reaction required.
  • Key idea: gas density is not a fixed material property — it is a live function of PP, TT, and MM, and inverting that function identifies the gas.
The core insight

Because moles, not mass, are what the ideal gas law counts, converting between nn and mass through MM builds a bridge from P,V,TP,V,T straight to molar mass — turning any gas-density measurement into a molecular weigh-station.

The physical picture

Density is mass per volume, d=m/Vd = m/V. For a solid block of aluminum, dd is a fixed property — about 2.70 g/mL regardless of the size of the block, the room temperature, or the atmospheric pressure. That constancy comes from atoms sitting shoulder to shoulder in a nearly incompressible lattice. A gas is different. Its molecules are spread far apart, and the empty space between them is compressible — squeeze the container and the gas concentrates; heat it and it spreads out. Gas density is therefore not a fixed number for a substance; it is a function of the conditions. The same sample of O2\mathrm{O_2} has a low density in a large warm flask and a high density in a small cold flask. What is fixed, for a pure gas at given PP and TT, is molar mass — the mass of one mole of its molecules — and that is the quantity density measurements are used to extract. The link runs through moles. The The Ideal Gas Law states PV=nRTPV = nRT, and moles convert to mass via n=m/Mn = m/M. Substituting turns a volume-based law into a density-based law, with MM sitting explicitly in the formula. This is the single most useful rearrangement of the ideal gas law for identifying unknown gases in the lab.

Figure
Same gas, two conditions: density rises as volume shrinks at fixed mass and moles
0.100 mol of a gas, same mass, two containers V = 2.44 L, T = 298 K d = 1.15 g/L V = 0.50 L, T = 298 K d = 5.62 g/L same n, m smaller V → higher d

The picture generalizes: compressing a gas (shrinking VV at fixed n,Tn,T) raises PP and raises dd together, because d=PM/RTd = PM/RT says density tracks pressure directly. Heating a gas at fixed PP lowers density because dd is inversely proportional to TT.

The core relations

PV=nRTPV = nRT

where: PP = pressure, VV = volume, nn = moles, R=0.08206 L atm mol−1K−1R = 0.08206\ \mathrm{L\,atm\,mol^{-1}K^{-1}} (or 8.314 J mol−1K−18.314\ \mathrm{J\,mol^{-1}K^{-1}}), TT = absolute temperature (K).

d=PMRTd = \frac{PM}{RT}

where: dd = gas density (g/L when PP in atm, R=0.08206R = 0.08206), MM = molar mass (g/mol), TT in kelvin.

M=dRTPM = \frac{dRT}{P}

where: same symbols; this is the rearranged form used to find molar mass from a measured density.

M=mRTPVM = \frac{mRT}{PV}

where: mm = mass of gas sample (g), VV = volume it occupies — useful when density itself isn't given directly but mass and volume are.

Derivation AFrom PV = nRT to d = PM/RT

Goal. Show that gas density depends only on pressure, molar mass, and temperature, and derive the formula that lets density measurements yield molar mass.

Step 1. Start from the ideal gas law relating pressure, volume, moles, and temperature:

PV=nRTPV = nRT

Step 2. Moles and mass are connected through molar mass by definition,

n=mMn = \frac{m}{M}

where mm is the total mass of gas present and MM is the mass of one mole of its molecules.

Step 3. Substitute this expression for nn into the ideal gas law:

PV=mMRTPV = \frac{m}{M}RT

Step 4. Rearrange to isolate the ratio m/Vm/V, which is exactly the definition of density dd:

mV=PMRT\frac{m}{V} = \frac{PM}{RT}
d=PMRTd = \frac{PM}{RT}

Step 5. This says density is not fixed for "a gas" in the abstract — it depends on PP and TT as well as on the identity of the gas through MM. Two different gases at the same PP and TT have densities in the same ratio as their molar masses:

d1d2=M1M2(same P,T)\frac{d_1}{d_2} = \frac{M_1}{M_2}\quad (\text{same } P, T)

Step 6. Solve the boxed relation for MM instead, since in the lab dd, PP, and TT are the measured quantities and MM is the unknown to be identified:

M=dRTPM = \frac{dRT}{P}

Step 7 — limiting case. As T→∞T \to \infty at fixed PP, the gas expands to fill unbounded volume for the same moles, so d→0d \to 0; the formula agrees, since d=PM/RT→0d = PM/RT \to 0 as TT grows without bound. Conversely, as P→0P \to 0 at fixed TT, density also vanishes — consistent with a gas thinning to nothing as pressure drops. Both limits behave physically, confirming the derivation carries no hidden sign or inversion error.

Worked examples

Example 1 — Identifying an unknown gas from its density. A gas sample has a measured density of 1.965 g/L1.965\ \mathrm{g/L} at T=308 KT = 308\ \mathrm{K} and P=1.00 atmP = 1.00\ \mathrm{atm}. Find its molar mass and suggest an identity.

Step 1. Use the molar mass form directly:

M=dRTPM = \frac{dRT}{P}

Step 2. Insert the numbers, with R=0.08206 L atm mol−1K−1R = 0.08206\ \mathrm{L\,atm\,mol^{-1}K^{-1}}:

M=(1.965 g/L)(0.08206 L atm mol−1K−1)(308 K)1.00 atmM = \frac{(1.965\ \mathrm{g/L})(0.08206\ \mathrm{L\,atm\,mol^{-1}K^{-1}})(308\ \mathrm{K})}{1.00\ \mathrm{atm}}

Step 3. Multiply the numerator piece by piece:

1.965×0.08206=0.161251.965 \times 0.08206 = 0.16125
0.16125×308=49.670.16125 \times 308 = 49.67

Step 4. Divide by pressure:

M=49.671.00=49.7 g/molM = \frac{49.67}{1.00} = 49.7\ \mathrm{g/mol}

Step 5 — interpret. A molar mass near 44.0 g/mol would suggest CO2\mathrm{CO_2}; near 70.9 g/mol would suggest Cl2\mathrm{Cl_2}. At 49.7 g/mol the closest common candidate is Freon-like or sulfur-containing species; in a teaching context this value is often engineered to match SO2\mathrm{SO_2} isotopic variants or a hypothetical gas XX — the numeric method is the point: from three bench measurements alone, molar mass is pinned to three significant figures without any chemical reaction.

Example 2 — Molar mass from mass, volume, pressure, and temperature (no density given directly). A 0.250 L flask is evacuated, then filled with an unknown gas. The gas has a mass of 0.646 g at P=0.988 atmP = 0.988\ \mathrm{atm} and T=372 KT = 372\ \mathrm{K}. Find the molar mass.

Step 1. Use the mass-volume form:

M=mRTPVM = \frac{mRT}{PV}

Step 2. Compute the numerator:

mRT=(0.646 g)(0.08206 L atm mol−1K−1)(372 K)mRT = (0.646\ \mathrm{g})(0.08206\ \mathrm{L\,atm\,mol^{-1}K^{-1}})(372\ \mathrm{K})
0.646×0.08206=0.053010.646 \times 0.08206 = 0.05301
0.05301×372=19.720.05301 \times 372 = 19.72

Step 3. Compute the denominator:

PV=(0.988 atm)(0.250 L)=0.2470 L atmPV = (0.988\ \mathrm{atm})(0.250\ \mathrm{L}) = 0.2470\ \mathrm{L\,atm}

Step 4. Divide:

M=19.720.2470=79.8 g/molM = \frac{19.72}{0.2470} = 79.8\ \mathrm{g/mol}

Step 5 — sanity check via limiting reasoning. If the same mass had instead filled a larger flask (say 0.500 L) at the same P,TP, T, molar mass computed from the formula would come out half as large — but that would only be correct if the same number of moles now occupies twice the space, meaning the mass-to-mole ratio implied by the data changed. This flags that mass, volume, pressure, and temperature must all describe the same physical sample simultaneously; mixing data from two different states silently produces a wrong MM. Checking that 79.8 g/mol is a plausible whole-gas molar mass (close to Br\mathrm{Br}-containing or SO3\mathrm{SO_3}-range species) is the final consistency step before reporting an identity.

Limiting cases & common traps

SituationWhat happensWhy
TT increases, P,nP,n fixeddd decreasesd=PM/RTd = PM/RT, inverse in TT
PP increases, T,nT,n fixeddd increases proportionallyd=PM/RTd = PM/RT, direct in PP
Two gases, same P,TP,Tdenser gas has larger MMd1/d2=M1/M2d_1/d_2 = M_1/M_2
Temperature given in °Cformula silently wrongRR requires kelvin
Using STP volume (22.4 L/mol) at non-standard P,TP,Tmolar mass overstated/understated22.4 L/mol only holds at exactly 1 atm, 273 K

The chemist behind it

The density–molar mass relation is a direct algebraic consequence of the ideal gas law, but its practical use — inferring the molecular formula of an unknown vapor from its measured vapor density — was pioneered as an experimental technique in the nineteenth century, when chemists needed a way to compare atomic and molecular weights of gases without modern spectroscopy. The method of heating a liquid to vapor inside a bulb of known volume, then weighing the condensed gas, became a standard determination of molecular weight and helped settle early debates about whether elements like sulfur and phosphorus existed as diatomic or polyatomic vapor species.

Origins · 1 minAmedeo Avogadro and how this was discovered
AA
Amedeo Avogadro
1776–1856 · Turin, Kingdom of Sardinia

Avogadro proposed in 1811 that equal volumes of gases, at the same temperature and pressure, contain equal numbers of molecules — the hypothesis that makes gas density a clean proxy for molar mass. His insight, initially resisted for decades, was the conceptual seed later formalized into the ideal gas law and eventually into the mole itself, the quantity that now bears his name in Avogadro's number.

Ask the tutor: How does the density–molar mass relation change if the gas is collected over water and its pressure includes water vapor's partial pressure?

Why does molar mass appear in the density formula but not in the basic ideal gas law?

The basic law PV=nRTPV=nRT is written in terms of moles, a count of particles, which is identity-independent — one mole of H2\mathrm{H_2} occupies the same volume as one mole of CO2\mathrm{CO_2} at the same P,TP,T. Molar mass enters only when moles are converted to mass via n=m/Mn = m/M, which is where the gas's chemical identity enters the picture.

Does the density formula work for gas mixtures?

Yes, with MM replaced by the mixture's average (mean) molar mass, Mavg=∑xiMiM_{avg} = \sum x_i M_i, where xix_i are mole fractions. The derivation is identical; d=PMavg/RTd = PM_{avg}/RT gives the mixture's overall density, which is why humid air is slightly less dense than dry air — water vapor's molar mass (18.0 g/mol) is lower than the average for dry air (~28.97 g/mol).

Can this method distinguish between two gases with the same molar mass, like N2 and CO, both near 28 g/mol?

No — density alone cannot distinguish isomers or coincidentally equal-mass species, since d=PM/RTd = PM/RT depends only on MM, not on molecular structure or connectivity. Additional evidence (reactivity, spectroscopy, combustion products) is needed to resolve such ties.

How does this connect to finding the molecular formula of a compound?

Once molar mass is known from density, dividing by the empirical formula mass reveals the multiplier nn in (empirical formula)n_n = molecular formula — the density method supplies the missing piece that stoichiometric empirical-formula analysis alone cannot give.

What goes wrong if the gas is not close to ideal, e.g. at high pressure or low temperature?

Real gases deviate from PV=nRTPV=nRT under high pressure or near condensation, so a density-based MM calculated there will be systematically off; the ideal gas law is most reliable at low pressure and moderate-to-high temperature, well above the gas's boiling point.