Knowing the formula of the gas, its molar mass can be calculated by elementary counting. Take carbon dioxide. Its formula is CO2. So its molar mass is: 12 + 32 (molar mass of oxygen with an index "2") = 44.
Well, if you need to calculate the molar mass of an unknown gas, which in some confined space, for example, a hermetically sealed container? Here we come to the aid of the universal equation Mendeleev–Clapeyron describing the state of an "ideal gas". Of course, none of the gas does not satisfy the conditions "perfect", but when pressure and temperature are insignificant different from normal, this equation is very convenient for calculations. And obtained when computing the error is very small and it can be safely ignored.
The generic equation has the following form: PV = MRT/m, hder – pressure gas in Pascals;
V is the volume in cubic metres;
M – the actual weight of gas;
m is its molar mass;
R – universal gas constant;
T – temperature of gas in degrees Kelvin.
You will see that the molar mass is calculated by the formula MRT/PV. For example, it is necessary to find the molar mass of gas, if you know that 3 pounds of this gas are in a sealed container with a volume of 1.7 cubic meter at a pressure of 100000 PA and a temperature of 27 degrees Celsius.
Substitute the known values in this formula, of course, not forgetting first to convert to one system of quantities. Otherwise, it's complete nonsense. 3,0*8,31*300/170000=0,04399 kg/mol.
Well, since the molar mass of the substance measured in grams per mole, multiply the result by 1000 and get the answer: molar mass of gas, under such conditions, equal 43.99 grams/mol or subject to rounding - 44 grams/mol. That is, it is the same carbon dioxide.