Molar Mass from Gas Density
The ideal-gas toolkit for densities: turn a measured gas density into a molar mass (M = ρRT/P) in any units, predict the density of any gas from its formula, reduce mass-and-volume lab data, find the composition of a two-gas mixture from its density, and run the classical limiting-density extrapolation — all with every step shown.
✓ Trusted by students, teachers & lab professionalsMolar Mass from a Measured Gas Density
Combine the ideal gas law with n = m/M and the density falls out: ρ = PM/RT, so M = ρRT/P. Enter the density in any unit with the temperature and pressure at which it was measured (leave T and P blank for STP: 0 °C, 1 atm).
Gas Density from a Formula or Molar Mass
The forward problem: ρ = PM/RT. Type a formula (IUPAC 2021 atomic weights, parentheses and hydrates accepted) or a molar mass in g/mol, plus the conditions. You get the density at your T and P, at STP, at SATP (25 °C, 1 bar) and at 25 °C / 1 atm, the vapor density, and whether the gas sinks or rises in air.
Molar Mass from Mass, Volume, Temperature and Pressure
The Dumas-bulb, gas-syringe and “weigh the flask” experiments: a known mass of gas fills a known volume at a known T and P. The tool computes the density (m/V), the moles (n = PV/RT), the molar mass (M = m/n) and the volume corrected to STP. If the gas was collected over water, enter the aqueous tension and it is subtracted (Dalton’s law).
Composition of a Two-Gas Mixture from Its Density
A mixture behaves like a single gas of average molar mass M̄ = ρRT/P, and M̄ = xAMA + (1 − xA)MB. Enter the two gases (formula or molar mass), the measured density and the conditions to get mole fractions, mass fractions and partial pressures.
Limiting-Density Method (ρ/P Extrapolated to P → 0)
Real gases are not quite ideal, so M = ρRT/P drifts with pressure. The classical fix: measure ρ at several pressures, plot ρ/P against P, and extrapolate to zero pressure where every gas is ideal — M = (ρ/P)0 · RT. Enter two to four (P, ρ) pairs at one temperature; the tool fits the straight line and reports the exact molar mass, the slope and R².
🕘 Recent calculations
- No calculations yet — your last 10 results will appear here.
M = ρRT/P · R = 0.082057 L·atm/(mol·K) · STP = 0 °C, 1 atm (22.414 L/mol) · SATP = 25 °C, 1 bar (24.790 L/mol) · air = 28.96 g/mol · 1 atm = 101.325 kPa = 760 mmHg = 1.01325 bar = 14.696 psi · Molar masses: IUPAC 2021 · Free tool by molecularweightcalculator.org
Finding the molar mass from gas density is the one ideal-gas calculation that turns a physical measurement into a chemical identity. Weigh a liter of an unknown gas, note the temperature and pressure, and the equation M = ρRT/P hands you the molar mass — 44 g/mol and it is carbon dioxide, 28 and it is nitrogen or carbon monoxide, 2 and you are holding hydrogen. It is how argon was discovered, how Dumas weighed volatile liquids in 1826, and how every first-year chemistry student meets the idea that a gas law can double as a balance for molecules.
The free molar mass from gas density calculator above handles the whole topic in five modes: molar mass from a density in any unit at any temperature and pressure, the density of any gas predicted from its formula at STP, SATP or your own conditions, molar mass reduced from laboratory mass-and-volume data with an aqueous-tension correction, the composition of a two-gas mixture from its measured density, and the classical limiting-density extrapolation that removes non-ideal error. Every mode prints the working line by line, so you can copy it straight into an answer script or a lab report.
In this guide I’ll derive the molar mass from gas density formula from PV = nRT, show the unit conversions that decide most marks, explain why STP, SATP and “room temperature” give three different densities for the same gas, walk through the worked examples every exam recycles, and finish with practice problems and the mistakes that cost the most points. Let’s begin.
🔑 KEY TAKEAWAY
Combine the ideal gas law PV = nRT with n = m/M and the density ρ = m/V falls out as ρ = PM/RT. Rearranged, it gives the molar mass from gas density: M = ρRT ÷ P, with ρ in g/L, R = 0.082057 L·atm/(mol·K), T in kelvin and P in atm. At STP (0 °C, 1 atm) the molar volume is 22.414 L, so the formula collapses to M = density × 22.414: a gas of density 1.964 g/L at STP has M = 44.0 g/mol (CO₂); 1.25 g/L gives 28.0 g/mol (N₂ or CO). Density depends on conditions — CO₂ is 1.964 g/L at STP but 1.799 g/L at 25 °C — so always carry the temperature and pressure with the number.
📑 Table of Contents (click to expand)
- What Does “Molar Mass from Gas Density” Mean?
- How to Use This Calculator
- The Five Modes Explained
- The Molar Mass from Gas Density Formula (With the Box You Should Memorize)
- Why It Works: From PV = nRT to ρ = PM/RT
- STP, SATP and Room Temperature: Why One Gas Has Three Densities
- Three Worked Examples, Step by Step
- Reference Table: Densities of Common Gases
- Measuring Gas Density in the Lab: Dumas, Regnault and the Gas Syringe
- Who Uses the Gas Density Method?
- Full Lab Walkthrough: Identifying a Cylinder Gas
- A Short History: Regnault, Rayleigh and the Discovery of Argon
- Gas Density in Everyday Life and Safety
- Practice Problems (With Answers)
- Tips for Fast, Error-Free Calculations
- 5 Common Mistakes to Avoid
- How This Calculator Is Different
- Where the Numbers Come From
- Exam Checklist
- Frequently Asked Questions
- 10 Gas Density Facts Worth Knowing
What Does “Molar Mass from Gas Density” Mean?
Every molar mass from gas density problem rests on a simple physical fact: at a given temperature and pressure, one mole of any ideal gas occupies the same volume. At 0 °C and 1 atm that volume is 22.414 L; at 25 °C and 1 atm it is 24.465 L. So if you know how much a liter of gas weighs, you know how much a mole weighs — just scale the liter up to the molar volume. Density (grams per liter) times molar volume (liters per mole) equals molar mass (grams per mole).
The molar mass from gas density connection is the ideal gas law read backwards. PV = nRT counts molecules; substitute n = m/M, rearrange, and the mass per volume becomes ρ = PM/RT. Everything on the right-hand side except M is either a constant or something you measure with a thermometer and a barometer, so the density measurement — a balance and a flask — delivers M. The result is a molar mass in the ordinary sense, directly comparable with the value the molecular weight calculator homepage computes from a formula, which is exactly how you confirm an identity.
Two things the method is not. It is not the same as vapor density, the dimensionless ratio of a gas’s density to hydrogen’s, which our molecular weight vapor density page covers; absolute density has units and changes with conditions, vapor density does not. And it is not exact for real gases at high pressure or near their boiling points — CO₂ at 1 atm and 0 °C is 0.7% denser than the ideal law predicts — which is why the classical limiting-density method (Mode 5) extrapolates to zero pressure. For ordinary exam conditions the ideal formula is accurate to better than 1%, and that is the level every molar mass from gas density question expects.
How to Use This Calculator
The tool at the top of the page was built so that a molar mass from gas density question takes less time to solve than to read. Here is the workflow:
- Pick the mode that matches your data: a density with its conditions (Mode 1), a formula or molar mass whose density you want (Mode 2), raw mass-volume-T-P lab data (Mode 3), a two-gas mixture (Mode 4), or several densities at different pressures (Mode 5).
- Enter the numbers in whatever units you have. Density accepts g/L, kg/m³, g/mL, mg/L and lb/ft³; temperature accepts °C, K and °F; pressure accepts atm, kPa, mmHg, bar, psi and hPa. The tool converts everything to R’s units and shows each conversion.
- Leave T and P blank for STP (0 °C, 1 atm) in Modes 1, 2 and 4 — the default most textbook problems assume — or click a preset chip to load a classic example.
- Press Calculate (or Enter). The headline result appears first, then the step-by-step derivation, a table of every derived quantity, and a bar chart comparing the gas with air and hydrogen.
- Read the extras: Modes 1, 3 and 5 suggest gases from a 30-gas library that fall within 1.5% of your molar mass; Mode 2 tells you whether the gas sinks or rises in air.
- Export with Copy, CSV, TXT, Print or Share — and hit ↺ Reset before the next problem so stale inputs never contaminate a fresh calculation.
Your last ten results are stored in the history panel below the calculator (locally in your browser, nothing is uploaded). Clear All wipes it in one click.
The Five Modes Explained
💨 Mode 1 — Density → Molar Mass
The core molar mass from gas density conversion. Type the density, choose its unit, enter the temperature and pressure (or leave them blank for STP), and the tool computes the molar volume RT/P at those conditions and multiplies. It then re-expresses the result on every scale you might be asked for — vapor density, relative density versus air, and the density the same gas would have at STP and at 25 °C — and lists library gases within 1.5%. A density of 1.25 g/L at STP flags nitrogen and carbon monoxide, a reminder that the method delivers a molar mass, not a name.
🧪 Mode 2 — Density from Formula
The forward direction of the molar mass from gas density relationship. Enter a formula (parentheses, hydrates and dot notation accepted) or a bare molar mass, plus the conditions, and get ρ = PM/RT at your T and P alongside the density at STP, at SATP (25 °C, 1 bar) and at 25 °C / 1 atm — the three “standard” densities that textbooks quote without always saying which they mean. Butane at 20 °C and 101.3 kPa comes out at 2.42 g/L, twice the density of air; the verdict line tells you a leak would pool at floor level.
🔬 Mode 3 — Lab Data (m, V, T, P)
The laboratory route to a molar mass from gas density value. Enter the mass of gas, the volume it fills (mL or L), the temperature and the pressure in any unit; if the gas was collected over water, add the aqueous tension and the tool subtracts it (Dalton’s law). Out come the density, the moles from n = PV/RT, the molar mass, the vapor density, the volume corrected to STP for the classical “22,414 mL” check, and a library suggestion when the molar mass matches a known gas. Presets cover a Dumas bulb, a gas syringe and hydrogen collected over water.
🌬️ Mode 4 — Mixture Composition
A mixture of ideal gases behaves like a single gas whose molar mass is the mole-fraction-weighted average. Measure its density, compute that average with M̄ = ρRT/P, and one line of algebra gives the mole fraction of each component: xA = (M̄ − MB) ÷ (MA − MB). This molar mass from gas density mode returns mole fractions, mass fractions and partial pressures — for an N₂/O₂ mixture of density 1.30 g/L at STP, 71.8 mol% nitrogen. It refuses the calculation if the density falls outside the range between the two pure gases, which is the fastest way to catch a unit error.
📈 Mode 5 — Limiting Density
The precision method. Because real gases deviate from ideality, M = ρRT/P drifts slightly with pressure; the fix, used by Rayleigh and by every gas-density determination of atomic weights in the early twentieth century, is to measure ρ at several pressures, plot ρ/P against P, and extrapolate to P = 0 where every gas is ideal. Enter two to four (P, ρ) pairs at one temperature and the mode fits the least-squares line, reports the intercept, slope and R², converts the intercept to M, and tells you whether attractive or repulsive forces dominate the deviation.
The Molar Mass from Gas Density Formula (With the Box You Should Memorize)
Every problem this page can pose — no exceptions — is one of these lines rearranged:
ρ = P·M ÷ (R·T) ⇄ M = ρ·R·T ÷ P
At STP: M = ρ × 22.414 · at 25 °C, 1 atm: M = ρ × 24.465
M̄ = xAMA + xBMB · M = (ρ/P)P→0 · RT · n = PV/RT, M = m/n
R = 0.082057 L·atm/(mol·K) = 8.314 J/(mol·K) · 1 atm = 101.325 kPa = 760 mmHg = 1.01325 bar = 14.696 psi · T(K) = t(°C) + 273.15
Two details in that molar mass from gas density box decide most marks. First, units must match R. With R = 0.082057 L·atm/(mol·K), the density must be in grams per liter, the pressure in atmospheres and the temperature in kelvin — write ÷ 101.325, ÷ 760 and + 273.15 on the page before touching anything else. (Conveniently, 1 g/L = 1 kg/m³, so SI densities need no conversion.) Second, the conditions belong to the measurement, not to the gas. A density quoted “at STP” and one quoted “at room temperature” differ by 9% for the same substance; feed the wrong T into the formula and the molar mass inherits the whole 9%.
Notice also what the molar mass from gas density formula rewards: pattern recognition. At STP the awkward product RT/P is simply 22.414 L/mol, so M is the density times 22.4 — a one-step mental check that catches most slips. At 25 °C and 1 atm the factor is 24.465; at 25 °C and 1 bar (SATP) it is 24.790. Memorize those three numbers and you can sanity-check any result in your head before writing it down.
Why It Works: From PV = nRT to ρ = PM/RT
The derivation is four lines long and worth reproducing in any exam answer, because it shows the examiner you understand where the formula comes from. Start with the ideal gas law, PV = nRT. The amount of gas, n, is its mass divided by its molar mass: n = m/M. Substitute: PV = (m/M)RT. Now gather the mass and volume on one side: m/V = PM/RT. The left-hand side is the density, ρ. So ρ = PM/RT, and solving for the molar mass gives M = ρRT/P.
That is the entire theory behind a molar mass from gas density calculation, and it carries two lessons. Density is proportional to molar mass — at the same T and P, heavier molecules make denser gas, which is why CO₂ sinks and helium rises. And density is proportional to P/T — compress a gas or cool it and it gets denser, which is why the conditions must always accompany a quoted density. The molar mass, by contrast, is a property of the substance and does not change; that is what makes it worth extracting.
The same equation explains Avogadro’s law from the other direction. Because M cancels out of V/n = RT/P, one mole of any ideal gas occupies the same volume at the same conditions — 22.414 L at STP. Equal volumes therefore hold equal numbers of molecules, and the ratio of two gas densities at the same T and P is exactly the ratio of their molar masses. Historically this is the argument Cannizzaro used in 1858 to fix the atomic weights, and it is why the density of air (1.292 g/L at STP) divided by that of hydrogen (0.0899 g/L) gives 14.4 — air’s molar mass, 28.96, divided by hydrogen’s 2.016.
The ideal assumption is the only approximation. Real gases have finite molecular volume and attractive forces, summarized in the compressibility factor Z = PV/nRT; the true density is ρ = PM/(ZRT), so an ideal molar mass from gas density result is too high by the factor 1/Z. For nitrogen at 1 atm and 0 °C, Z = 0.9995 and the error is invisible; for CO₂ it is 0.9934 and the error is 0.7%; for a vapor near its boiling point it can reach several percent. Mode 5’s extrapolation to zero pressure, where Z → 1 for every gas, removes it entirely. The other tools in this family — the stoichiometry calculator for reacting gas volumes and the grams to moles calculator for the n = m/M step on its own — share the same ideal-gas foundation.
STP, SATP and Room Temperature: Why One Gas Has Three Densities
More molar mass from gas density answers go wrong on the conditions than on the algebra, because three different “standard” states are in circulation and textbooks rarely say which one they mean. Take carbon dioxide, M = 44.009 g/mol, as the running example.
STP — 0 °C and 1 atm (273.15 K, 101.325 kPa). The traditional standard and the one most school and university problems assume. Molar volume 22.414 L/mol; ρ(CO₂) = 44.009 ÷ 22.414 = 1.964 g/L. If a problem says “at STP” and nothing else, use this.
STP (IUPAC, since 1982) — 0 °C and 1 bar (100 kPa). IUPAC quietly moved the standard pressure from 1 atm to 1 bar, which raises the molar volume to 22.711 L/mol and lowers every density by 1.3%: ρ(CO₂) = 1.938 g/L. Some newer textbooks and most data compilations use this; if your syllabus does, run Mode 1 or Mode 2 with P = 1 bar instead of 1 atm.
SATP — 25 °C and 1 bar (298.15 K, 100 kPa). “Standard ambient” conditions, common in thermodynamics tables. Molar volume 24.790 L/mol; ρ(CO₂) = 1.775 g/L. The calculator reports this value alongside every Mode 2 result.
Room temperature — 25 °C and 1 atm, or 20 °C and 1 atm. What safety data sheets and many lab manuals mean by “ambient”. At 25 °C and 1 atm the molar volume is 24.465 L/mol and ρ(CO₂) = 1.799 g/L; at 20 °C it is 1.830 g/L. Air, for comparison, is 1.292 g/L at STP, 1.204 g/L at 20 °C and 1.184 g/L at 25 °C.
The spread — 1.775 to 1.964 g/L for one gas — is 10%, and it is entirely a matter of conditions — which makes it fatal to any molar mass from gas density answer that ignores them. Feed a 25 °C density into the STP shortcut M = ρ × 22.414 and CO₂ comes out at 40.3 g/mol, an error big enough to misidentify the gas. The rule is simple: every molar mass from gas density calculation must use the temperature and pressure at which the density was measured, and if a problem gives a density without conditions, it means STP at 1 atm.
Three Worked Examples, Step by Step
Example 1 — The classic molar mass from gas density problem
Problem: A gas has a density of 1.964 g/L at 0 °C and 1 atm. Find its molar mass and suggest its identity.
Step 1 — Units: ρ = 1.964 g/L; T = 0 + 273.15 = 273.15 K; P = 1 atm. Everything already matches R.
Step 2 — Molar volume: RT/P = 0.082057 × 273.15 ÷ 1 = 22.414 L/mol.
Step 3 — Molar mass: M = ρ × RT/P = 1.964 × 22.414 = 44.02 g/mol.
Identity: 44.0 g/mol matches carbon dioxide (44.009), nitrous oxide (44.013) and propane (44.097) to within 0.2%. The density fixes the molar mass; a lime-water test or a flame would pick the molecule. Relative to air the gas is 44.02 ÷ 28.96 = 1.52 times denser — it sinks.
Example 2 — A Dumas-bulb determination with mixed units
Problem: A 275 mL bulb is filled with the vapor of a volatile liquid at 99 °C and 748 mmHg. The vapor weighs 0.516 g. Find the density and molar mass of the vapor.
Step 1 — Units: V = 0.275 L; T = 99 + 273.15 = 372.15 K; P = 748 ÷ 760 = 0.98421 atm.
Step 2 — Density: ρ = 0.516 ÷ 0.275 = 1.876 g/L (at 99 °C and 748 mmHg — not a standard density).
Step 3 — Molar mass: M = ρRT/P = 1.876 × 0.082057 × 372.15 ÷ 0.98421 = 58.2 g/mol. Equivalently n = PV/RT = 0.98421 × 0.275 ÷ (0.082057 × 372.15) = 8.863 × 10⁻³ mol and M = 0.516 ÷ 8.863 × 10⁻³ = 58.2 g/mol.
Identity: Acetone (C₃H₆O, 58.08 g/mol) fits within 0.25%; butane (58.12) also fits numerically but is a gas, not a liquid that boils below 99 °C — the experiment itself rules it out. Reduced to STP the vapor would have a density of 58.2 ÷ 22.414 = 2.60 g/L.
Example 3 — Molar mass from gas density for a mixture: how much oxygen is in the cylinder?
Problem: A nitrogen–oxygen mixture has a density of 1.30 g/L at STP. Find its composition in mole percent.
Step 1 — Average molar mass: M̄ = ρ × 22.414 = 1.30 × 22.414 = 29.14 g/mol.
Step 2 — Mixing rule: M̄ = x·M(N₂) + (1 − x)·M(O₂) = 28.014x + 31.998(1 − x).
Step 3 — Solve: x = (M̄ − 31.998) ÷ (28.014 − 31.998) = (29.14 − 31.998) ÷ (−3.984) = 0.718.
Answer: 71.8 mol% N₂ and 28.2 mol% O₂ — an oxygen-enriched mixture (air is 79/21). By mass the split is 69.0% / 31.0%, and at 1 atm the partial pressures are 0.718 and 0.282 atm. Note how sensitive the method is: the two pure gases differ in density by only 0.18 g/L at STP, so a 0.01 g/L error in the density shifts the composition by about 6 mol%. Weigh carefully.
Reference Table: Densities of Common Gases
Keep this table beside you when checking a molar mass from gas density answer — a result that lands near one of these is usually right, and one that lands between them is a hint that the gas is a mixture or a vapor of a liquid. Molar masses use IUPAC 2021 atomic weights; densities are ideal-gas values at 0 °C / 1 atm (STP) and 25 °C / 1 atm.
| Gas | M (g/mol) | ρ at STP (g/L) | ρ at 25 °C, 1 atm (g/L) | Relative to air | In air it… |
|---|---|---|---|---|---|
| Hydrogen, H₂ | 2.016 | 0.0899 | 0.0824 | 0.070 | rises fast |
| Helium, He | 4.003 | 0.1786 | 0.1636 | 0.138 | rises fast |
| Methane, CH₄ | 16.043 | 0.7158 | 0.6557 | 0.554 | rises |
| Ammonia, NH₃ | 17.031 | 0.7598 | 0.6961 | 0.588 | rises |
| Water vapor, H₂O | 18.015 | 0.8037* | 0.7363* | 0.622 | rises (humid air is lighter) |
| Carbon monoxide, CO | 28.010 | 1.2497 | 1.1449 | 0.967 | mixes evenly |
| Nitrogen, N₂ | 28.014 | 1.2498 | 1.1450 | 0.967 | mixes evenly |
| Dry air (reference) | 28.96 | 1.2920 | 1.1837 | 1.000 | — |
| Oxygen, O₂ | 31.998 | 1.4276 | 1.3079 | 1.105 | sinks slightly |
| Argon, Ar | 39.95 | 1.7824 | 1.6329 | 1.379 | sinks |
| Carbon dioxide, CO₂ | 44.009 | 1.9635 | 1.7988 | 1.520 | sinks (cellars, Lake Nyos) |
| Propane, C₃H₈ | 44.097 | 1.9674 | 1.8024 | 1.523 | sinks (LPG leaks pool) |
| Nitrogen dioxide, NO₂ | 46.005 | 2.0525 | 1.8804 | 1.589 | sinks |
| Sulfur dioxide, SO₂ | 64.066 | 2.8583 | 2.6186 | 2.212 | sinks |
| Chlorine, Cl₂ | 70.90 | 3.1632 | 2.8980 | 2.448 | sinks |
| Krypton, Kr | 83.80 | 3.7386 | 3.4252 | 2.894 | sinks |
| Xenon, Xe | 131.29 | 5.8575 | 5.3664 | 4.533 | sinks |
| Sulfur hexafluoride, SF₆ | 146.05 | 6.5160 | 5.9697 | 5.043 | sinks (the “invisible boat” demo) |
*Water vapor cannot exist as an ideal gas at 1 atm below 100 °C; the values are the hypothetical ideal-gas densities used in humidity calculations.
Two patterns are worth noticing in any molar mass from gas density table. Carbon monoxide and nitrogen differ by 0.0001 g/L — no density measurement will separate them, and a molar mass from gas density result near 28 should always be followed by a chemical test. And the “relative to air” column follows a simple rule: anything beyond about 0.95–1.05 will stratify in still air, so the gases that kill in confined spaces — CO₂, propane, chlorine — are precisely the ones that pool where people stand. Molar masses for gases not in the table come straight from the atomic mass calculator or from Mode 2 above.
Measuring Gas Density in the Lab: Dumas, Regnault and the Gas Syringe
Three techniques produced almost every molar mass from gas density value in the literature, and all three are still run in teaching laboratories in some form.
Regnault’s globe (1840s) — for permanent gases. A large glass globe of accurately known volume is evacuated, weighed, filled with the gas at a measured temperature and pressure, and weighed again. Mass difference over volume is the density; the ideal gas law converts it to M. Henri Victor Regnault’s globes, corrected for buoyancy and for the slight expansion of glass under vacuum, gave the densities of oxygen, nitrogen, hydrogen and air that anchored the atomic-weight tables of the 1860s, and Rayleigh’s refinement of the same apparatus fifty years later was precise to one part in ten thousand — precise enough to find argon.
Dumas’ bulb (1826) — for volatile liquids. A glass bulb with a drawn-out neck is weighed full of air, a few milliliters of liquid are drawn in, and the bulb is immersed in a bath above the liquid’s boiling point until the last drop has vaporized and the bulb contains nothing but vapor at bath temperature and atmospheric pressure. The neck is sealed with a flame, the bulb is cooled, dried and weighed, and finally opened under water to find its volume. The mass of vapor is the sealed mass minus the empty (air-free) mass, and M follows from Mode 3. The classic student version uses an Erlenmeyer flask capped with pierced aluminium foil in place of the sealed bulb.
The gas syringe and the weighed flask — for teaching. A 100 mL syringe or a stoppered flask is weighed evacuated (or air-filled, with an air-buoyancy correction), filled with the gas, and reweighed; volume, temperature and pressure are read directly. For gases collected over water — hydrogen from zinc and acid, oxygen from decomposing peroxide — the aqueous tension at the water temperature must be subtracted from the barometer reading, because the collected gas is saturated with water vapor. Mode 3 applies that correction automatically.
Whatever the apparatus, the reduction is identical: dry pressure in atmospheres, volume in liters, temperature in kelvin, n = PV/RT, M = m/n. The osmotic pressure, freezing point depression and boiling point elevation methods cover the non-volatile solids the gas methods cannot reach; between them, classical chemistry could weigh almost any molecule.
Who Uses the Gas Density Method?
Students and teachers. Molar mass from gas density questions appear in every high-school and first-year syllabus — CBSE, IB, A-level, AP and the university general-chemistry sequence — because they combine the ideal gas law, unit conversion and the mole concept in a single problem. The calculator lets a teacher generate and check a fresh set of numbers in seconds and lets a student see the intermediate steps they are expected to write.
Process, HVAC and safety engineers. Gas density sets the mass flow through a pipe for a given volumetric flow, the pressure drop across a valve, the buoyancy of a leak and the placement of gas detectors. Industrial gas suppliers quote densities at 15 °C or 20 °C and 1 atm, and converting those to molar mass — or to density at plant conditions — is the same M = ρRT/P calculation run every day in flow computers.
Analytical chemists and natural-gas operators. Because a mixture’s density gives its average molar mass, gas density is a routine quality check: the specific gravity of natural gas (0.55–0.70 relative to air) tracks its methane content and heating value, and biogas plants monitor the CH₄/CO₂ ratio the same way. Mode 4 is that calculation for any two-component mixture.
Anesthesiologists and respiratory therapists. Gas density governs flow through narrow airways and the behaviour of anesthetic vapors: heliox (helium–oxygen) eases breathing through an obstructed airway precisely because its density is a third of air’s, and the low-density mixture’s composition can be verified from a density reading.
Meteorologists, balloonists and divers use the same equation under other names. Air density from temperature, pressure and humidity is ρ = PM̄/RT with M̄ adjusted for water vapor; the lift of a helium balloon is the difference between two molar mass from gas density values; and the density of a breathing mix at depth follows from P alone.
Full Lab Walkthrough: Identifying a Cylinder Gas
Suppose an unlabelled lecture-bottle in the store room might contain nitrogen, carbon dioxide or argon, and you have a 100 mL gas syringe, a four-figure balance, a thermometer and a barometer. Here is the complete molar mass from gas density workflow with realistic numbers.
- Weigh the empty syringe. Draw the plunger to 100.0 mL of laboratory air, cap the nozzle and weigh: 58.4127 g. Record room temperature (25.0 °C) and barometric pressure (760 mmHg).
- Correct for the air already inside. 100 mL of air at 25 °C and 1 atm weighs 0.1184 g, so the syringe itself weighs 58.4127 − 0.1184 = 58.2943 g. (Skipping this step is the most common source of a wildly wrong answer.)
- Flush and fill with the unknown. Purge the syringe three times with gas from the cylinder, draw exactly 100.0 mL at room conditions, cap and weigh: 58.4743 g.
- Mass of gas. 58.4743 − 58.2943 = 0.1800 g.
- Density. ρ = 0.1800 g ÷ 0.1000 L = 1.800 g/L at 25 °C and 1 atm.
- Molar mass. M = ρRT/P = 1.800 × 0.082057 × 298.15 ÷ 1 = 44.04 g/mol (or n = 4.087 × 10⁻³ mol and M = 0.1800 ÷ n).
- Identify. Nitrogen would have given 1.145 g/L, argon 1.633 g/L; 1.800 g/L matches carbon dioxide (1.799 g/L at these conditions) to 0.1%. The library lookup in Mode 3 flags CO₂ at +0.07%.
- Confirm and report. A drop of lime water in the syringe turns milky; report the cylinder as CO₂ with M = 44.0 ± 0.3 g/mol, the uncertainty dominated by the ±0.5 mL volume reading.
Two lessons from the molar mass from gas density walkthrough. The air-buoyancy correction changed the mass of gas by 0.118 g on a 0.180 g sample — skip it and you would report 65 g/mol and nothing in the store room fits. And the density alone could not distinguish CO₂ from N₂O or propane (all 44); the lime-water test did the identifying. Type “0.180, 100, 25, 1” into Mode 3 to see the whole chain printed out.
A Short History: Regnault, Rayleigh and the Discovery of Argon
The molar mass from gas density method is older than the ideal gas law it is usually derived from. Gay-Lussac and Biot were weighing gases in glass globes by 1805; Dumas’ vapor-density bulb followed in 1826; and by the 1840s Henri Victor Regnault had turned gas-density measurement into a precision science, correcting for buoyancy, thermal expansion of the glass and the compression of the globe under vacuum. His densities for oxygen (1.4298 g/L) and nitrogen (1.2562 g/L) at 0 °C and 760 mmHg stood for half a century, and they were the experimental backbone of Cannizzaro’s 1858 argument that fixed the atomic weights and made the periodic table possible.
The method’s greatest triumph came from a discrepancy in the fourth decimal place. In 1892 Lord Rayleigh, redetermining the density of nitrogen to refine its atomic weight, found that nitrogen extracted from air (1.2572 g/L) was consistently 0.5% denser than nitrogen made chemically from ammonia (1.2505 g/L). He published a short letter in Nature asking for explanations; William Ramsay suggested the atmospheric sample contained a heavier, unreactive gas. Removing all the nitrogen from air by repeated passage over hot magnesium left a residue with a density corresponding to a molar mass of about 40 — argon, a whole new column of the periodic table, discovered because a molar mass from gas density measurement disagreed with itself by half a percent. Rayleigh and Ramsay shared the 1904 Nobel Prizes in Physics and Chemistry for it.
The same precision drove the limiting-density method. Around 1900 Daniel Berthelot and Philippe Guye realized that the small deviations of real gases from PV = nRT could be eliminated by measuring density at several pressures and extrapolating ρ/P to zero pressure, where every gas is ideal. Guye’s laboratory in Geneva used the technique to determine the atomic weights of nitrogen, carbon, chlorine and others to four significant figures — values that competed with, and sometimes beat, the best gravimetric chemistry until mass spectrometry took over in the 1920s. Mode 5 is that method, reduced to a form that fits in a browser.
Today the mass spectrometer measures molecular masses to a millionth of a unit — see our monoisotopic mass calculator and the average vs monoisotopic mass guide for the modern side — but gas density remains the method of choice wherever a quick, absolute, calibration-free molar mass is wanted, from teaching labs to pipeline flow computers.
Gas Density in Everyday Life and Safety
Because the molar mass from gas density relationship links what a gas weighs to what it is, it shows up in more everyday situations than any other gas property.
- Where the gas alarm goes. Natural gas (methane, 0.66 g/L at 25 °C against air’s 1.18) rises, so kitchen detectors go high on the wall; LPG (propane/butane, 1.8–2.4 g/L) sinks, so cylinder-fed kitchens need them near the floor. A detector mounted for the wrong gas will never trigger.
- Lake Nyos, 1986. Carbon dioxide (1.52 times denser than air) released from a volcanic lake in Cameroon flowed downhill as an invisible river and suffocated some 1,700 people in villages up to 25 km away — the deadliest demonstration of a gas-density fact in history.
- Wine cellars, silos and manholes. Fermentation CO₂ and sewer hydrogen sulfide pool at the bottom of confined spaces; the “candle test” — a flame that dies near the floor — is a crude density measurement that has saved lives for centuries.
- Balloons and airships. A helium balloon lifts the difference between the density of air and of helium — about 1.02 g per liter at 25 °C, 1.11 g/L at 0 °C. Hydrogen lifts only 8% more, which is why the far safer helium won after 1937. Hot-air balloons work the same equation from the T side: air at 100 °C is 0.95 g/L, a quarter lighter than at 25 °C.
- Natural-gas billing. Pipeline gas is sold by energy content, and the flow computer estimates it partly from the gas’s specific gravity — its density relative to air — because a heavier gas means more ethane and propane and more heat per cubic meter.
- Weather and aviation. Air density from temperature, pressure and humidity is the molar mass from gas density formula run forwards, and it sets aircraft lift: on a hot, humid, high-altitude day the air can be 20% thinner than standard, and runways get proportionally longer.
- Voice tricks. Breathing helium (0.16 g/L) or sulfur hexafluoride (5.97 g/L) shifts the resonances of the vocal tract because the speed of sound scales as the inverse square root of the gas density — the same density difference that makes SF₆ pour like an invisible liquid.
Practice Problems (With Answers)
Work each problem by hand first, then verify with the free molar mass from gas density calculator above. Answers are hidden until you click.
Problem 1 — A gas has a density of 1.25 g/L at STP. Find its molar mass and suggest what it might be.
M = ρ × 22.414 = 1.25 × 22.414 = 28.0 g/mol. Nitrogen (28.014), carbon monoxide (28.010) and ethylene (28.054) all fit — three gases the density alone cannot separate. A glowing splint (N₂ and CO both extinguish it, but CO burns with a blue flame) or lime water after combustion would decide.
Problem 2 — What is the density of chlorine gas at 25 °C and 1 atm? Will it sink or rise in air?
M(Cl₂) = 2 × 35.45 = 70.90 g/mol; RT/P = 0.082057 × 298.15 ÷ 1 = 24.465 L/mol; ρ = 70.90 ÷ 24.465 = 2.898 g/L. Air at the same conditions is 1.184 g/L, so chlorine is 2.45 times denser and sinks — which is why it was used in trench warfare and why chlorine leaks flow into low ground.
Problem 3 — In a Dumas experiment, 0.320 g of vapor fills a 125 mL flask at 100 °C and 1.00 atm. Find the molar mass of the liquid.
n = PV/RT = 1.00 × 0.125 ÷ (0.082057 × 373.15) = 4.082 × 10⁻³ mol; M = 0.320 ÷ 4.082 × 10⁻³ = 78.4 g/mol. Equivalently ρ = 2.56 g/L at 100 °C, and M = 2.56 × 0.082057 × 373.15 = 78.4. Benzene (78.11 g/mol) fits within 0.4%.
Problem 4 — A nitrogen–helium mixture has a density of 0.800 g/L at STP. Find the mole fraction of nitrogen.
M̄ = 0.800 × 22.414 = 17.93 g/mol. M̄ = 28.014x + 4.003(1 − x) → x = (17.93 − 4.003) ÷ (28.014 − 4.003) = 0.580. The mixture is 58.0 mol% N₂ and 42.0 mol% He; by mass it is 90.6% nitrogen, because helium contributes almost no mass.
Problem 5 — At what temperature (in °C) does carbon dioxide at 1.00 atm have a density of exactly 1.00 g/L?
Rearrange ρ = PM/RT for T: T = PM ÷ (ρR) = 1.00 × 44.009 ÷ (1.00 × 0.082057) = 536.3 K = 263 °C. Heating the gas from 0 °C to 263 °C roughly halves its density (1.964 → 1.00 g/L) because the absolute temperature roughly doubles — a useful reminder that T in the molar mass from gas density formula is always kelvin.
Tips for Fast, Error-Free Calculations
- ✅ Convert everything to R’s units first — the number-one molar mass from gas density habit: g/L, atm, kelvin. Write ÷ 760 (or ÷ 101.325), + 273.15 and, for kg/m³, “= g/L” on the page before touching anything else, and the units audit themselves.
- ✅ Keep the three molar volumes in your head: 22.414 L/mol at STP (1 atm), 22.711 at STP (1 bar), 24.465 at 25 °C and 1 atm. Most molar mass from gas density problems are one multiplication by one of those.
- ✅ Sanity-check against air. Air is 1.29 g/L at STP and 1.18 g/L at 25 °C. A gas density below 0.08 or above about 10 g/L at ordinary conditions is almost certainly a unit error (g/mL entered as g/L, or kPa entered as atm).
- ✅ Subtract the aqueous tension whenever a gas was collected over water — 17.5 mmHg at 20 °C, 23.8 at 25 °C. It is a 2–3% effect and it always makes the molar mass come out too low if forgotten.
- ✅ Correct for the air in the “empty” flask in a weighing experiment — 100 mL of air weighs 0.12 g, which is comparable to the whole sample for a light gas. Buoyancy, not the balance, limits the accuracy of a molar mass from gas density determination.
- ✅ Reset between problems — the ↺ Reset button on each mode of the molar mass from gas density calculator keeps old inputs from contaminating the next calculation.
⚗️ Pro workflow: Mode 1 to turn any quoted density into a molar mass → Mode 2 to check the candidate’s predicted density against the measurement → Mode 3 when the raw data are a mass, a volume, a temperature and a pressure → Mode 4 the moment the gas might be a mixture → Mode 5 when you have densities at more than one pressure and want the last decimal place. Copy the steps, paste them into your report, and Reset.
5 Common Mistakes to Avoid
A decade of marking molar mass from gas density answers produces the same five errors on repeat:
- Using Celsius instead of kelvin. Density is inversely proportional to absolute temperature; 25 instead of 298.15 makes every molar mass twelve times too small — instantly recognizable, still endlessly submitted.
- Leaving the pressure in kPa or mmHg while using R = 0.082057. The classic molar mass from gas density trap: the answer is off by exactly 101.3 or 760. If you prefer to keep kPa, switch to R = 8.314 L·kPa/(mol·K); just never mix the two.
- Applying the STP shortcut to a room-temperature density. M = ρ × 22.414 is only true at 0 °C and 1 atm. Used on a 25 °C density it understates M by 9% — enough to turn CO₂ (44) into an impossible 40.
- Confusing g/L with g/mL. Gas densities at ordinary conditions are a few grams per liter; a value of 0.0018 “g/L” is really g/mL and the molar mass comes out a thousand times too small. Conveniently, g/L and kg/m³ are identical, so SI data need no conversion at all.
- Forgetting that a density gives a molar mass, not an identity. 28 g/mol is N₂, CO or C₂H₄; 44 is CO₂, N₂O or C₃H₈. State the molar mass, then use a chemical test or an empirical formula to name the gas — the molar mass from gas density calculator lists every library match so you can see the ambiguity at a glance.
How This Calculator Is Different
| Feature | This calculator | Generic density tool | By hand |
|---|---|---|---|
| Units: 5 density, 3 temperature, 6 pressure | ✅ Auto-converted, every conversion shown | ⚠️ Usually g/L, K, atm only | Manual, error-prone |
| Gas-identity suggestions (30-gas library, ±1.5%) | ✅ With % deviation | ❌ | Table lookup |
| Formula input (IUPAC 2021 masses) → density at STP, SATP, 25 °C and custom T, P | ✅ All four + sink/rise verdict | ❌ Numbers only | Periodic table needed |
| Lab-data reduction with aqueous-tension correction and STP check | ✅ mL or L; mmHg, atm, kPa, bar, psi | ❌ | ✅ Slow |
| Two-gas mixture composition (mole %, mass %, partial pressures) | ✅ With out-of-range detection | ❌ | Algebra often inverted |
| Limiting-density least-squares fit (intercept, slope, R², non-ideality verdict) | ✅ Up to 4 points | ❌ | Graph paper |
| Export & history | ✅ CSV/TXT/print/share + last 10 | ❌ Usually none | Notebook |
Related molar mass from gas density companions carry the theme onward: gas mixtures such as air itself in the average molecular weight of a mixture tool; exact and isotope-level masses in the exact mass calculator and isotopic mass calculator; ionic compounds in the formula weight calculator; water of crystallization in the molar mass of hydrates calculator; solutions in the molarity calculator; and for polymers, where a single molecular weight does not exist, the number average, weight average and polydispersity index calculators.
Where the Numbers Come From
The constants built into this molar mass from gas density calculator are the CODATA values: R = 0.082057366 L·atm/(mol·K) = 8.314462618 J/(mol·K); 1 atm = 101,325 Pa = 760 mmHg = 1.01325 bar = 14.6959 psi exactly; 1 lb/ft³ = 16.018463 kg/m³. Molar volumes follow directly: 22.414 L/mol at 0 °C and 1 atm, 22.711 L/mol at 0 °C and 1 bar, 24.790 L/mol at SATP and 24.465 L/mol at 25 °C and 1 atm. The molar mass of dry air, 28.96 g/mol, is the standard-atmosphere composition average (78.08% N₂, 20.95% O₂, 0.93% Ar, 0.04% CO₂). Molar masses computed from formulas use the IUPAC 2021 conventional atomic weights, the same table behind every other tool on this site, so a density found here will agree to the last digit with the homepage calculator.
Molar mass from gas density textbooks differ in one convention: whether “STP” means 1 atm (22.414 L/mol) or 1 bar (22.711 L/mol). The calculator defaults to 1 atm, labels the pressure it used in every step, and lets you enter 1 bar explicitly. If you spot a discrepancy worth checking, our corrections policy explains how reports are handled, and the contact page is the fastest way to reach us; more about the site and its author is on the about page.
Exam Checklist
☐ I know R = 0.082057 L·atm/(mol·K), that T must be in kelvin, and that ρ must be in g/L (= kg/m³) with P in atm.
☐ I know the molar volumes 22.414 L (STP, 1 atm), 22.711 L (STP, 1 bar) and 24.465 L (25 °C, 1 atm), and which one a question means.
☐ I can reduce mass-volume-T-P lab data to a molar mass, subtracting the aqueous tension for gases collected over water.
☐ I can find the composition of a two-gas mixture from its density using M̄ = xAMA + xBMB.
☐ I can explain why real gases deviate from M = ρRT/P and how the limiting-density extrapolation removes the error.
☐ I know why a density gives a molar mass but not an identity, and which gases share 28 and 44 g/mol.
☐ I’ve verified my practice answers with the molar mass from gas density calculator above.
Frequently Asked Questions
How do you calculate molar mass from gas density?
Use M = ρRT/P: multiply the density (g/L) by the gas constant R = 0.082057 L·atm/(mol·K) and the absolute temperature (K), then divide by the pressure (atm). Example: 1.964 g/L at 0 °C and 1 atm gives M = 1.964 × 0.082057 × 273.15 ÷ 1 = 44.0 g/mol, carbon dioxide. At STP the calculation collapses to M = density × 22.414.
What is the formula that relates density and molar mass of a gas?
ρ = PM/RT. It comes from substituting n = m/M into PV = nRT and rearranging to m/V = PM/RT. Density is proportional to molar mass and pressure and inversely proportional to absolute temperature, so heavier gases are denser and hot gases are lighter — the two facts behind sinking CO₂ and rising hot-air balloons.
Why does the molar mass from gas density calculator need temperature and pressure?
Because gas density changes with conditions: CO₂ is 1.964 g/L at 0 °C but 1.799 g/L at 25 °C. The molar mass does not change, so to extract it you must know the T and P at which the density was measured. If a problem gives a density with no conditions, it means STP — 0 °C and 1 atm — and the calculator uses those defaults when you leave the fields blank.
What is the molar volume of a gas at STP, and why is it 22.4 L?
V/n = RT/P = 0.082057 × 273.15 ÷ 1 = 22.414 L/mol at 0 °C and 1 atm. It is the same for every ideal gas because the molar mass cancels out of the ideal gas law — Avogadro’s law in another form. Under IUPAC’s 1982 definition of STP (0 °C, 1 bar) the value is 22.711 L/mol, and at 25 °C and 1 atm it is 24.465 L/mol.
Is gas density the same as vapor density?
No. Gas density is an absolute quantity in g/L (or kg/m³) that depends on temperature and pressure. Vapor density is the dimensionless ratio of a gas’s density to hydrogen’s at the same conditions, equal to M ÷ 2, and it does not change with conditions. CO₂ has a density of 1.964 g/L at STP and a vapor density of 22 everywhere. Our molecular weight vapor density page covers the ratio; this page covers the absolute density.
Can I use the density of a gas to identify it?
Partly. Density gives the molar mass, and the molar mass narrows the candidates, but several common gases share a value: N₂, CO and C₂H₄ are all 28 g/mol; CO₂, N₂O and C₃H₈ are all 44. The calculator lists every library gas within 1.5% of your result; a chemical test (lime water, a glowing splint, litmus) or an empirical formula from combustion analysis picks the molecule.
How do you find the density of a gas from its molar mass?
Run the formula forwards: ρ = PM/RT. For chlorine at 25 °C and 1 atm, ρ = 1 × 70.90 ÷ (0.082057 × 298.15) = 2.898 g/L. At STP simply divide the molar mass by 22.414. Mode 2 of the calculator accepts a formula or a molar mass and returns the density at your conditions, at STP, at SATP and at 25 °C.
How accurate is molar mass from gas density for real gases?
Within about 0.1–1% at 1 atm and ordinary temperatures — nitrogen, oxygen and hydrogen are ideal to 0.05%; CO₂ deviates by 0.7% at 0 °C; vapors close to their boiling points can deviate by several percent. The error scales with pressure, so measuring at several pressures and extrapolating ρ/P to zero pressure (Mode 5) recovers the exact molar mass — the method that gave four-figure atomic weights a century ago.
How do you find the composition of a gas mixture from its density?
Compute the mixture’s average molar mass with M̄ = ρRT/P, then solve M̄ = x·MA + (1 − x)·MB for the mole fraction x. An N₂/O₂ mixture of density 1.30 g/L at STP has M̄ = 29.14 g/mol and is 71.8 mol% nitrogen. The method only works for two components and is only as precise as the density measurement, because the two pure gases may differ in density by only a few percent.
Is this molar mass from gas density calculator free, and does it work on phones?
Yes on both counts. All five modes are free with no sign-up, the page is fully responsive, and calculations run in your browser, so nothing you type is sent to a server. Your last ten results are kept in local storage on your own device and can be wiped with Clear All.
10 Gas Density Facts Worth Knowing
- One mole of any ideal gas occupies 22.414 L at 0 °C and 1 atm — so the molar mass from gas density rule at STP is simply “density times 22.4”.
- Air has a density of 1.292 g/L at STP and an average molar mass of 28.96 g/mol — the reference against which every “heavier than air” verdict is made.
- Argon was discovered in 1894 because nitrogen from air was 0.5% denser than nitrogen from ammonia — a gas-density discrepancy that earned two Nobel Prizes.
- Hydrogen, at 0.0899 g/L, is the least dense gas; a liter of it weighs less than a tenth of a gram, and a helium balloon lifts about a gram per liter.
- Sulfur hexafluoride (6.52 g/L at STP) is five times denser than air — dense enough to float an aluminium-foil boat on an invisible “lake” of it.
- Guye’s limiting-density measurements around 1905 gave the atomic weight of nitrogen as 14.008 — within 0.01% of today’s value — decades before mass spectrometry.
- Humid air is lighter than dry air because water vapor (M = 18) displaces nitrogen and oxygen (M = 28–32), lowering the average molar mass — one reason storms brew in moist, rising air.
- Heating a gas from 0 °C to 273 °C halves its density, because density is inversely proportional to absolute temperature; a hot-air balloon is that fact with a basket attached.
- The specific gravity of natural gas (0.55–0.70 relative to air) is measured continuously in pipelines because it tracks the ethane and propane content, and therefore the heating value.
- The 1986 Lake Nyos disaster, in which a cloud of CO₂ 1.5 times denser than air flowed 25 km downhill, remains the starkest illustration of why gas density belongs on every safety data sheet.
🔗 Trusted external resources
Final Thoughts
The molar mass from gas density method is a rare thing in chemistry: a molecular measurement you can make with a balance, a thermometer and a barometer, whose theory is four lines of algebra, and which once discovered an element. Behind M = ρRT/P sit four small rules — units that match R, kelvin not Celsius, the conditions of the measurement rather than a memorized standard, and a dry pressure for gases collected over water — plus one piece of lab wisdom: a density gives a molar mass, and it takes a chemical test to turn that into a name. Master those, let the calculator above verify every line, and this topic becomes the easiest marks on the paper.
Bookmark this molar mass from gas density page for your next problem set or lab report, share it with a labmate before the gas-laws practical, and explore the rest of our free chemistry tools — from the molecular weight calculator homepage to the molecular weight vapor density guide for the relative-density side of the same idea.
Written & Reviewed By
Ahmad Raza, M.Phil. Chemistry
Ahmad is a chemistry educator and science content developer with over 10 years of experience teaching analytical and physical chemistry. He builds free calculation tools that help students and lab professionals work faster and make fewer errors. When he’s not balancing equations, he’s usually grading titration reports.