Calculate gas density from molecular weight (molar mass) at STP or your own pressure and temperature, or work back from density to molar mass.

Molecular weight of the gas, e.g. 28.01 for Nโ‚‚. Liquid or solid density canโ€™t be found from molar mass alone.

Prefilled with standard pressure, 1 atm. Use absolute pressure, not gauge.

Prefilled with standard temperature, 0 ยฐC (STP). Change it for other conditions.

Optional settings
Default 1: ideal gas. Use a known factor for the same gas, pressure and temperature.

Density From Molecular Weight Formula

The gas-density relation uses dimensional molar mass M. With a prescribed compressibility factor Z, ฯ = PM/(ZRT); Z = 1 gives the ideal-gas form below. Use absolute pressure and temperature in kelvin.

D = P ร— MW / (R ร— T)
  • Where D is the Density From Molecular Weight (kg/m^3)
  • P is the absolute gas pressure (Pa) 
  • MW in this formula means molar mass (kg/mol); relative molecular mass is dimensionless. 
  • T is the temperature (K) 
  • R is the universal gas constant (8.314462618 J/(molยทK))

For an ideal gas, multiply absolute pressure by molar mass and divide by RT. With a known nonideal factor, divide by ZRT instead. A supplied Z must match gas composition and the resulting pressure and temperature; the calculator treats Z as prescribed and does not solve an equation of state. Molecular mass alone does not determine a liquid or solid density, and this relation does not verify gas-phase stability.

Molecular Weight to Density Conversion Table (Ideal Gas at 1 atm, 25ยฐC; R = 8.314462618 J/(molยทK))
Molecular Weight (g/mol) Density (kg/mยณ)
20.082
40.163
160.654
170.695
180.736
200.817
281.144
28.971.184
301.226
321.308
341.390
36.461.490
401.635
441.798
582.371
642.616
843.433
984.006
131.295.366
146.065.970
* Rounded to 3 decimals. Ideal gas relation: ฯ = (P ร— M) / (R ร— T). Assumes P = 1 atm (101,325 Pa), T = 25ยฐC (298.15 K), R = 8.314462618 J/(molยทK). 1 g/mol โ†’ 0.040874 kg/mยณ at these conditions.

How to Calculate Density From Molecular Weight?

The examples are hypothetical ideal-gas algebra with Z = 1. They do not identify actual substances or establish that a substance remains gaseous at the stated conditions.

Example Problem #1

  1. First, determine the pressure (Pa).
    1. The pressure (Pa) is given as 3000.
  2. Next, determine the molecular weight (kg/mol).
    1. The molecular weight (kg/mol) is calculated as .44.
  3. Next, determine the temperature (K).
    1. The temperature (K) is found to be 250.
  4. Finally, calculate the Density From Molecular Weight using the formula above: 

D = P * MW / (R*T)

Inserting the values from above yields: 

D = 3000 ร— 0.44 / (8.314462618 ร— 250) = 0.635 kg/mยณ


Example Problem #2

The variables needed for this problem are provided below:

pressure (Pa) = 240

molecular weight (kg/mol) = 205

temperature (K) = 100

This example problem is a test of your knowledge on the subject. Use the calculator above to check your answer. 

D = 240 ร— 205 / (8.314462618 ร— 100) = 59.174 kg/mยณ. The given 205 kg/mol is retained as a hypothetical algebra input, not a claim about an existing gas at 100 K. See NIST on gas density and condition-specific compressibility.