Suppose to you the task: it is necessary to determine the mass of carbon dioxide gasoccupies at normal pressure and room temperature, the volume of 0.18 m^3. First of all, remember the universal rule that 1 mole of any gas at normal conditions occupies a volume equal to 22.4 liters. (More precisely, 22, 414 liters, but to simplify the calculations, this value can be rounded).
Then move the volume in liters. 0.18 m^3 is 180 liters. Accordingly, it contains 180/22,4 = 8,036 moles of carbon dioxide gas.
Now remains the last step. Formula of carbonic gas - CO2. Its molar mass: 12 + 16*2 = 44 gram/mol. That is, one mole of carbon dioxide gas contains about 44 grams of this substance. How much it 8,036 moles? Perform the multiplication: 44*8,036 = 353, 58 grams or rounded 353,6 grams. The problem is solved.
If you need to find the mass of the same carbon dioxide gas, but under conditions very different from normal? For example, some amount of gas placed in a sealed vessel of volume V, is heated to a temperature T, measured his pressure, proved equal to P. Question: what mass of carbon dioxide gas contained in the vessel under such conditions?
And this task is also very simple. To solve it you just have to remember the equation Mendeleev-Clapeyron, named after two outstanding scientists. It was derived by them to describe States of so-called "ideal gas". Its formula is: PV = MRT/m. Or in a slightly modified form: PVm = МRT, where S is the pressure in Pascals, V is the volume in cubic meters, m is the molar mass of gas, M is its effective mass, T is the temperature in degrees Kelvin, R is the universal gas constant, approximately equal to 8,31.
It is easy to see that the actual mass of gas M is calculated by the formula: M = PVm / RT. Substituting in this formula all the known data, and remembering that the molar mass of carbon dioxide gas m is equal to 44 grams/mole, you will easily get the answer.
Of course, neither carbon dioxide nor any other is not an ideal gas. Therefore, the equation Mendeleev-Clapeyron is not quite exactly describes his condition. But if the conditions are not very different from normal, errors of the calculation are small and can be neglected.