The total number of moles of
in a sample can be found using the molar mass and ideal gas law; for example, 0.561 g of
equals 0.0127 moles. The mass of carbon in 0.0128 moles of
can also be calculated, yielding 0.1537 g of C. the total number of moles of
in cylinder A is 0.1537g mol
The total number of moles of
in a sample can be determined using stoichiometry and the ideal gas law. To calculate the moles of
when given a mass such as 0.561 g
, one would use the molar mass of
(44.01 g/mol) to convert the given mass to moles.
For example, if a sample contains 0.561 g
, the number of moles in the sample would be calculated as follows:
Number of moles (n) = mass (g) / molar mass (g/mol) = 0.561 g
/ 44.01 g/mol
= 0.0127 moles of

In a similar sense, if we know there are 0.0128 moles of
, we can calculate the grams of carbon (C) in the sample since
consists of one carbon atom. Carbon has a molar mass of 12.01 g/mol. Thus, the mass of carbon is calculated as:
0.0128 moles of C x 12.01 g/mol = 0.1537 g of C
Lastly, using the ideal gas law (PV = nRT), the volume of
can be determined if the pressure (P), temperature (T), and the ideal gas constant (R) are known. For conditions at standard temperature and pressure (STP), the volume occupied by one mole of any gas is 22.414 L/mol.