Part of the Science & Chemistry suite · 71 calculators

Molar Mass of a Gas Calculator

The molar mass of a gas from its mass, volume, pressure and temperature — the ideal gas law rearranged.

From PV = nRT and n = m/M, the molar mass is M = mRT/(PV).

g
L
kPa
°C
Results update as you type
Results
Molar mass
28.0175 g/mol
Moles of gas
Density (g/L)
Molar volume (L/mol)
Temperature (K)
Density relative to air
Consistent with
Reviewed September 2026. Chemistry is the same in every country: SI and laboratory units throughout.
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About molar mass of a gas

How the molar mass of a gas calculator works

From PV = nRT and n = m/M, the molar mass is M = mRT/(PV). Weighing a known volume of gas at a known temperature and pressure is one of the oldest ways to identify it.

The method assumes ideal behaviour, which is good to about 1% for common gases at ambient conditions and degrades near the boiling point or at high pressure.

Formula: M = mRT / (PV)

Worked examples

InputsMolar massNote
1.25 g in 1 L at STP28.0175 g/mol28.0 g/mol — nitrogen
1.96 g in 1 L at STP43.9314 g/mol43.9 — carbon dioxide
Hydrogen2.0173 g/mol2.02 g/mol

Frequently asked questions

How do I find a gas's molar mass?

Weigh a known volume at a known pressure and temperature, then apply M = mRT/PV.

What is the molar volume at STP?

22.41 L/mol at 0 °C and 101.325 kPa; 24.79 L/mol at 25 °C.

How accurate is this?

Within about 1% for common gases near ambient conditions. It degrades near the boiling point and at high pressure, where real gases stop behaving ideally.

Why do nitrogen and carbon monoxide give the same answer?

Because both are 28.01 g/mol. Molar mass alone cannot distinguish them — you would need a spectroscopic method.

What is relative density?

The gas density divided by air's. Above 1 the gas settles in low spaces, which is a serious safety consideration for propane and carbon dioxide.

Where these figures come from

Last checked: September 2026. Atomic masses are the IUPAC conventional values; constants are CODATA 2018; equations are the standard textbook forms.