16 min read
Gas Laws and Molar Mass
The ideal gas law connects pressure, volume, temperature, and moles — enabling molar mass from gas density and STP conversions. Includes a fully worked unknown-gas identification problem and real-world limits of ideal behavior.
Ideal gas law: PV = nRT
Pressure P, volume V, moles n, gas constant R, and temperature T (in kelvin) relate through PV = nRT. Rearranging gives n = PV/RT, then molar mass M = mass/n. A 2.00 L flask at 25 °C and 1.00 atm containing 3.28 g of gas with n = 0.134 mol yields M = 24.5 g/mol — consistent with propane C₃H₈ or a similar light hydrocarbon.
Molar volume at STP
At STP (0 °C, 1 bar), one mole of ideal gas occupies 22.7 L; at 1 atm, textbooks often use 22.4 L. Thus 22.4 L of CO₂ at STP has mass 44.01 g; 22.4 L of methane CH₄ has mass 16.04 g. Compare ammonia NH₃ (17.03 g/mol) — a polar gas that deviates slightly from ideality at high pressure — versus ideal predictions in introductory problems.
Gas density and molar mass
Density d = m/V. Combining with PV = nRT gives M = dRT/P for an ideal gas. Measuring density at known T and P allows molar mass determination without direct chemical analysis — useful for unknown gas identification. Carbon monoxide CO and nitrogen N₂ have nearly identical molar masses (~28 g/mol); density alone may not distinguish them — supplementary evidence is required.
Partial pressure and mixtures
Dalton's law: total pressure equals sum of partial pressures. Mole fraction × total pressure gives partial pressure of each gas. Dry air is mostly N₂ and O₂; molar mass of the mixture is a weighted average. Combustion of propane C₃H₈ or butane C₄H₁₀ in oxygen produces CO₂ and H₂O vapor — gas stoichiometry problems often ask for volume ratios at constant T and P, where mole ratios equal volume ratios for ideal gases.
Fully worked example: identifying an unknown gas
A 1.00 L flask at 27 °C (300 K) and 2.00 atm contains 3.55 g of an unknown gas. Using PV = nRT with R = 0.08206 L·atm/(mol·K): n = PV ÷ RT = (2.00 × 1.00) ÷ (0.08206 × 300) = 2.00 ÷ 24.62 = 0.0813 mol. Molar mass = mass ÷ moles = 3.55 ÷ 0.0813 = 43.7 g/mol.
Comparing this value against known gases, 43.7 g/mol is close to carbon dioxide (44.01 g/mol) or propane (44.10 g/mol) — additional evidence, such as odor, reactivity with limewater (which turns cloudy in the presence of CO₂), or combustibility (propane burns; CO₂ does not), would be needed to distinguish between them conclusively, since molar mass alone cannot always uniquely identify a gas when two candidates happen to have very similar values.
Why real gases deviate from ideal behavior
The ideal gas law assumes gas particles have no volume of their own and experience no attractive or repulsive forces between them — a convenient approximation that works well at typical classroom conditions (moderate pressure, moderate-to-high temperature) but breaks down under extreme conditions. At very high pressure, real gas molecules are squeezed close enough together that their actual volume becomes significant compared to the container's volume, causing real gases to occupy more space than the ideal gas law predicts. At very low temperature, intermolecular attractive forces become significant enough to pull molecules together, causing real gases to occupy less space than predicted (and eventually to condense into a liquid).
Polar gases like ammonia (NH₃) deviate from ideal behavior more noticeably than nonpolar gases like methane (CH₄) at the same conditions, because ammonia's molecules attract each other more strongly through hydrogen bonding and dipole interactions. For most introductory problems, these deviations are small enough to ignore, but it's worth remembering that "ideal gas" is a simplifying model, not a perfect description of any real gas under all conditions.
Related compounds
Related guides
- What Is Molar Mass?
- How to Calculate Molar Mass
- Stoichiometry Basics
- Common Molar Mass Mistakes
- The Mole Concept
- Percent Composition by Mass
Also try the molar mass calculator and periodic table.
Standards: how we calculate · editorial policy

