Determining the molar mass of an unknown gas involves a multistep experiment. A scientist first determines the mass of his flask by filling it with dry air and comparing the mass of the full flask with the air's known density. He then fills the flask with the unknown gas, measures its mass, temperature and pressure, and substitutes these values into the Ideal Gas Equation. Fortunately, most students and laymen do not have to perform this experiment, but they often need to how to use the same mass, temperature and pressure data to calculate molar mass.

Determine the density of the dry air in the flask by referring to a density chart. Density is dependent upon temperature and pressure, so make sure you select the appropriate value for conditions given in the problem.
For example, if the air is at standard temperature and pressure (approximately 273.15 degrees Kelvin and 101.33 kilopascals), its density is 1.29 grams per liter.

Substitute the density of the air and the given volume of the flask into the mass equation: mass = density * volume.
If the volume of the flask is 1 liter, then the equation becomes: mass = 1.29 * 1.

Simplify the equation to determine the mass of the air sample.
The dry air has a mass of 1.29 grams.

Subtract the mass of the air from the total mass of the airfilled flask, which was given in the problem. Record the answer as the mass of the flask.
If the full flask has a mass of 150 grams and the dry air has a mass of 1.29 gram, then the empty flask has a mass of 148.71 grams.

Subtract the mass of the flask from the mass of the flask filled with the unknown gas. Record this answer as the mass of the unknown gas.
If flask with the unknown gas has a mass of 151 grams, then the gas alone has a mass of 2.29 grams.

Substitute the mass, temperature and pressure of the unknown gas into the Ideal Gas Equation: moles of gas = (pressure volume)/(universal gas constant temperature). The universal gas constant is 8.3145 if pressure is expressed in kilopascals or 0.0821 if it is expressed in atmospheres.
For example, if the unknown gas is at standard temperature and pressure, the equation becomes: moles of gas = (101.33 1)/(8.3145 273.15).

Solve the equation to determine the moles of unknown gas in the flask.
There are approximately 0.044617 moles of gas inside the flask.

Divide the mass of the unknown gas by the moles of gas to determine its molar mass.
The gas has an approximate mass of 51.326 grams per mole.
Tips & Warnings
 Always measure the volume in liters and the temperature in degrees Kelvin when using the Ideal Gas Law.