This molar mass of gas calculator finds an unknown gas’s molar mass from its density using the rearranged ideal gas law, M = dRT / P — the classic method for identifying a gas from a measured mass and volume.

–

Weighing a Gas to Learn Its Name

Gases can’t be poured onto a balance, but their density can be measured — fill a known volume, weigh it, divide — and the ideal gas law converts that density into the one number that identifies a gas: its molar mass. The rearrangement is clean: from PV = nRT and n = m/M, density d = m/V gives M = dRT/P, with R = 0.08206 L·atm/(mol·K), T in kelvin (always kelvin — the single most common way this calculation dies in student hands), and P in atm. At STP the whole expression collapses to M = d × 22.414, since RT/P is just the molar volume, 22.414 L. The defaults run the textbook fingerprint: 1.25 g/L at STP → 28.0 g/mol, which narrows an unknown gas to N₂ or CO in one weighing — the historical method (Dumas bulbs, Victor Meyer displacement) by which the 19th century built its table of molecular weights before mass spectrometry existed.

Honesty box: the ideal gas law is an approximation that real gases obey beautifully at low pressure and room-ish temperatures and progressively worse near condensation. For identification work at classroom conditions the error is a fraction of a percent; for a gas like CO₂ at high pressure or a vapor near its boiling point, expect the computed M to drift high or low by a few percent — a clue in itself, since the direction of drift reports on intermolecular forces. Experimental density also inherits every measurement sin: a wet gas (collected over water) reads light unless the water-vapor partial pressure is subtracted (Dalton’s law) before the division — the correction that separates a correct 28.0 from a puzzling 27.4.

Worked Examples (Verified)

  • Defaults (STP): M = 1.25 × 0.08206 × 273.15 / 1 = 28.02 g/mol (N₂ or CO).
  • CO₂ check: density at STP 1.96 g/L → M = 1.96 × 22.414 = 43.9 ≈ 44.0 g/mol ✓.
  • Warm lab: unknown gas, d = 1.10 g/L at 298 K, 1 atm → M = 1.10 × 0.08206 × 298 = 26.9 g/mol.
  • Helium check: d = 0.179 g/L at STP → 4.01 g/mol ✓.

Gas Molar Mass Discipline

  • Kelvin or it didn’t happen: T(K) = T(°C) + 273.15; a Celsius slip at room temperature costs ~8% and a wrong identification.
  • Collected over water? Subtract water’s vapor pressure at that temperature from the total before using P (Dalton correction).
  • Density from mass/volume of the SAME sample at the SAME conditions quoted for T and P — a volume measured warm and a mass weighed cold is a fiction.
  • M ≈ 28 is genuinely ambiguous (N₂, CO, C₂H₄ all live there): density identifies to a shortlist; chemistry picks the winner.
  • Report M to the precision your density earned — three significant figures is the honest ceiling for bulb methods.

Related Tools

Frequently Asked Questions

How do you find the molar mass of a gas?

Measure its density (mass of a known volume) at a known temperature and pressure, then apply M = dRT/P from the ideal gas law, with R = 0.08206 L·atm/(mol·K) and T in kelvin. At STP this simplifies to M = density × 22.414. A gas at 1.25 g/L at STP gives M ≈ 28.0 g/mol. This calculator runs the full formula for any conditions you enter.

What is the molar mass of a gas at STP with density 1.25 g/L?

28.0 g/mol. At STP (273.15 K, 1 atm), one mole of ideal gas occupies 22.414 L, so M = d × 22.414 = 1.25 × 22.414 = 28.02 g/mol. That value fingerprints nitrogen (N₂, 28.01) or carbon monoxide (CO, 28.01) — identical molar masses that density alone cannot distinguish; a chemical test (CO burns and reduces metal oxides; N₂ does neither) settles it. The calculator reproduces this benchmark exactly at its default settings.

Why must temperature be in kelvin?

Because the gas law is built on absolute temperature: pressure is proportional to the average kinetic energy of the molecules, which is zero at absolute zero, not at the freezing point of water. Using 25 instead of 298 in M = dRT/P shrinks the answer by a factor of ~12 — not a rounding error, a different (wrong) gas. Every gas-law formula (Charles, Gay-Lussac, combined, ideal) carries the same rule: convert °C to K first, always.

What is the Dumas method?

The classical laboratory technique behind this formula: a thin glass bulb of known volume is filled with the vapor of a volatile liquid at known temperature and pressure, sealed, cooled and weighed. The mass of condensed vapor ÷ bulb volume gives the density, and M = dRT/P gives the molar mass — the method that produced many 19th-century molecular weights, including the evidence that settled atomic-weight controversies. The Victor Meyer variant displaces air instead of sealing a bulb; the arithmetic is identical.

How accurate is the ideal-gas molar mass?

At classroom conditions (near 1 atm, well above the gas’s boiling point), within a fraction of a percent — plenty to identify a gas against a table. Accuracy degrades as pressure rises or temperature approaches condensation, where intermolecular forces make the real molar volume differ from 22.414 L; CO₂ at STP already reads ~44.0 vs the ideal prediction within ~0.3%. For engineering precision, compressibility-factor (Z) corrections replace the ideal law; for identification, this formula is the standard tool.

Can I use this for a gas mixture like air?

Yes — the formula returns the AVERAGE molar mass of the mixture, which is a real and useful quantity: dry air at 1.29 g/L at STP gives ≈ 28.96 g/mol, the weighted mean of N₂ (78%), O₂ (21%) and Ar (1%). Average molar mass is what makes mixture densities, buoyancy and ventilation calculations work. Just know the answer describes the blend, not a single substance — no component of air actually weighs 28.96.

What if I know mass and volume instead of density?

Divide first: density = mass ÷ volume (in g/L), then use the calculator as normal — or equivalently use M = mRT/(PV) directly. Example: 0.560 g of gas fills 0.450 L at 298 K and 1.00 atm: d = 1.244 g/L, so M = 1.244 × 0.08206 × 298 ≈ 30.4 g/mol (near NO at 30.01 or ethane at 30.07 — the shortlist again). Keep mass, volume, T and P all measured on the same sample at the same moment.

Is this molar mass of gas calculator free?

Yes — free, instant, no sign-up. Enter density, temperature and pressure for the molar mass, with the derivation shown.