Molar Mass of Gas Calculator

Calculate gas molar mass from density, absolute temperature, and pressure with the ideal gas law for a clear identification estimate.

Calculate gas molar mass
Use density in grams per liter, temperature in kelvin, and pressure in atmospheres.

About the molar mass of a gas

The molar mass of a gas identifies the mass of one mole of its particles. When a gas behaves approximately ideally, its molar mass can be determined from measurable density, temperature, and pressure. Starting with the ideal gas law and expressing density as mass per volume gives a convenient relationship: molar mass equals density multiplied by the gas constant and absolute temperature, divided by absolute pressure. This calculator uses the gas constant 0.082057 liters atmospheres per mole kelvin. Its units require density in grams per liter, temperature in kelvin, and pressure in atmospheres. With those inputs, the unit factors cancel to produce grams per mole. Unit consistency is essential. A Celsius temperature cannot be inserted directly because the ideal gas law requires an absolute scale. Convert Celsius to kelvin by adding 273.15 before entering it. Gauge pressure should likewise be converted to absolute pressure, accounting for local atmospheric pressure. Gas density varies strongly with conditions. A density measurement is meaningful only when its associated temperature and pressure describe the same sample state. Increasing pressure generally compresses a gas and raises density, while increasing temperature at constant pressure lowers density. The formula accounts for these relationships, but it cannot correct a density value measured under different, unspecified conditions. Measurements should be taken after the sample reaches thermal and pressure equilibrium. The result can help identify an unknown pure gas by comparison with known molar masses or check experimental ideal-gas data. Real gases deviate from ideal behavior, particularly at high pressure, low temperature, or near condensation. In such cases a compressibility factor or a more advanced equation of state may be needed. Gas mixtures also produce an average apparent molar mass rather than the molar mass of a single component. Treat the displayed value as an ideal-gas estimate, preserve measurement precision, and consider uncertainty in density, pressure, and temperature when comparing candidate substances. The calculator rounds the displayed answer to at most six decimal places while retaining the deterministic constant throughout the calculation.

Gas molar mass examples

ConditionsMolar massInterpretation
1.842 g/L, 273.15 K, 1 atm41.286348 g/molAn ideal-gas estimate near standard conditions
1 g/L, 100 K, 1 atm8.2057 g/molA simple unit-check example
2 g/L, 300 K, 2 atm24.6171 g/molPressure offsets part of the density and temperature effect

How to calculate gas molar mass

  1. Enter the gas density in grams per liter.
  2. Enter the absolute gas temperature in kelvin.
  3. Enter the absolute gas pressure in atmospheres.
  4. Select Calculate gas molar mass to view the ideal-gas estimate.

Gas molar mass FAQ

Why must temperature be entered in kelvin?

The ideal gas law requires an absolute temperature measured from absolute zero. Celsius values would distort the proportional relationship and produce an incorrect molar mass.

Should I use gauge pressure or absolute pressure?

Use absolute pressure because the gas law is referenced to a vacuum. Add atmospheric pressure to a gauge reading when necessary and convert the result to atmospheres.

Does the formula work for real gases?

It is usually a useful approximation at moderate pressure and temperatures far from condensation. Strong nonideal behavior requires a compressibility correction or another equation of state.

Can the calculator identify an unknown gas?

The result can be compared with known molar masses to narrow possible identities. Experimental uncertainty, impurities, and gas mixtures mean the value alone is not definitive identification.

What happens if the sample is a gas mixture?

The calculation returns an average apparent molar mass for the mixture under ideal behavior. It does not reveal individual component amounts without additional composition data.