Convert g/mol to density: calculate gas density from molar mass at STP or custom conditions, find molar mass from density, or use molar volume.

Ideal-gas estimate; deviations can be significant at high pressure or near condensation.

Optional settings


Related Calculators

Calculator Functions

FunctionWhat it doesWhat it requires
Ideal gas densityFinds the density of a gas from its molar mass at a set temperature and pressureRequires the molar mass (g/mol or kg/mol) and the gas conditions: one of four presets, or a custom temperature and absolute pressure
Molar mass from gas densityFinds the molar mass of a gas from its density at a set temperature and pressureRequires the gas density (g/L, kg/mยณ or g/mL) and the gas conditions
Liquid or solid densityFinds density from molar mass and molar volumeRequires the molar mass and the molar volume of the substance (cmยณ/mol, mL/mol or L/mol) at its actual conditions

The gas presets are 0 ยฐC and 1 atm, 20 ยฐC and 1 atm, 25 ยฐC and 1 bar, and 25 ยฐC and 1 atm. A custom temperature can be in ยฐC, K or ยฐF, and a custom pressure in atm, bar, kPa, Pa, mmHg or psi [3]. The molar mass field offers approximate values for helium, hydrogen, methane, nitrogen, oxygen, carbon dioxide, ammonia and dry air. Density can be shown in g/L, kg/mยณ or g/mL, and every result also lists the molar density in mol/L.

g/mol to Density Formulas

ฯ = M ร— P รท (R ร— T) [1]
ฯGas density (g/L, which is the same number as kg/mยณ)
MMolar mass (g/mol)
PAbsolute pressure (kPa)
RMolar gas constant, 8.314462618 LยทkPa/(molยทK) [2]
TAbsolute temperature (K)

This is the ideal gas law written for density [1]. A molar mass alone has no density: the same gas is denser when it is colder or under more pressure, so the conditions are part of the question.

Ideal gas density

The main formula applies directly. Carbon dioxide at 44.0095 g/mol, 0 ยฐC and 1 atm (273.15 K and 101.325 kPa) comes to 44.0095 ร— 101.325 รท (8.314462618 ร— 273.15) = 1.9635 g/L. The table gives the same calculation for the gases offered in the molar mass field.

GasMolar mass (g/mol)Density at 0 ยฐC, 1 atm (g/L)Density at 25 ยฐC, 1 atm (g/L)
Hydrogen2.015880.08990.0824
Helium4.00260.17860.1636
Methane16.04250.71570.6557
Ammonia17.03050.75980.6961
Nitrogen28.01341.24981.1450
Dry air28.971.29251.1841
Oxygen31.99881.42761.3079
Carbon dioxide44.00951.96351.7988

Molar density

n รท V = P รท (R ร— T) = ฯ รท M

Molar density is the amount of substance per unit volume, in mol/L. For an ideal gas it depends only on temperature and pressure, not on which gas it is: 0.044615 mol/L at 0 ยฐC and 1 atm, which is 1 รท 22.414 L/mol. The calculator shows it under every result. For a liquid or solid it is 1 รท Vm. Multiplying a molar density by the molar mass gives the density in g/L.

Molar mass from gas density

M = ฯ ร— R ร— T รท P

A gas measured at 1.2506 g/L at 0 ยฐC and 1 atm has a molar mass of 1.2506 ร— 8.314462618 ร— 273.15 รท 101.325 = 28.0309 g/mol. The result is also shown as a molecular mass in Da, which is the same number.

Liquid or solid density

ฯ = M รท Vm

Vm is the molar volume, the space one mole of the substance takes up at its actual temperature and pressure. A substance of 58.44 g/mol with a molar volume of 27 cmยณ/mol has a density of 58.44 รท 27 = 2.16444 g/mL. Liquids and solids do not follow the gas law, so the molar volume has to come from a measurement or a reference table.

Limits of This Estimate

  • The gas functions treat the gas as ideal. Real gases drift from this at high pressure and near the point where they condense [1].
  • Temperature is absolute and pressure is absolute, not gauge. A gauge reading needs the local atmospheric pressure added before it goes in.
  • The 0 ยฐC and 1 atm preset is one convention for standard conditions. For a standard set at 1 bar or at another temperature, enter custom conditions.
  • The molar masses offered in the list are approximate. Dry air is a mixture, and its value is an average.

Sources

  1. NASA Glenn Research Center, Equation of State: ideal gas law in its density form, and that it holds only for an ideal gas
  2. NIST, CODATA Value: molar gas constant: R = 8.314462618 J/(molยทK), exact
  3. NIST, Guide for the Use of the International System of Units (SP 811), Appendix B.8: pascals in a standard atmosphere, mmHg and psi