Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Molar Mass
32
g/mol
Moles of gas (n) 1 mol
Gas density (ρ) 1.4277 g/L

What is the Molar Mass of Gas Calculator?

This tool calculates the molar mass (M) of a gaseous substance from four measurable quantities: the sample mass (m), its volume (V), the pressure (P), and the absolute temperature (T). It applies the ideal gas law, making it a fast way to identify an unknown gas or verify a measured molecular weight in the lab.

How to use it

Enter the mass of the gas in grams, the volume it occupies in litres, the pressure in atmospheres, and the temperature in kelvin (K = °C + 273.15). The calculator returns the molar mass in g/mol, along with the number of moles and the gas density.

The formula explained

The ideal gas law is \(PV = nRT\), where n is the number of moles. Since moles \(n = m/M\), substituting gives \(PV = (m/M)RT\). Solving for molar mass yields $$M = \frac{m\,R\,T}{P\,V}$$ Using density \(\rho = m/V\), this simplifies to $$M = \frac{\rho\,R\,T}{P}$$ Here \(R = 0.082057\ \text{L}\cdot\text{atm}\cdot\text{mol}^{-1}\cdot\text{K}^{-1}\) when pressure is in atm and volume in litres.

Diagram of a gas-filled container labeled with pressure, volume, temperature and mass, with the molar mass formula variables
The ideal gas law relates a gas sample's mass, pressure, volume and temperature to its molar mass.

Worked example

Suppose 32 g of an unknown gas occupies 22.414 L at 1 atm and 273.15 K (standard conditions). Moles $$n = \frac{1 \times 22.414}{0.082057 \times 273.15} \approx 1\ \text{mol},$$ so \(M = 32 / 1 = 32\ \text{g/mol}\) — identifying the gas as oxygen (O₂).

Flat bar comparison of molar masses of common gases
Calculated molar masses correspond to familiar gases such as hydrogen, oxygen and carbon dioxide.

FAQ

What units should I use? Mass in grams, volume in litres, pressure in atmospheres, and temperature in kelvin to match \(R = 0.082057\).

Does this assume ideal behaviour? Yes. Real gases deviate at high pressure or low temperature, but the ideal gas law is accurate for most everyday conditions.

Can I use Celsius? No — convert to kelvin first by adding 273.15, otherwise the result will be wrong.

Last updated: