foreign much more frequently than converting between grams and moles for an element we will have to convert between grams and moles for a compound this is because much of the chemistry we do is between different compounds and every compound has its own molar mass luckily this is almost as easy we simply have to calculate the molecular mass of a compound and express that number in grams to get the molar mass for a compound for example let's say we want to know the number of moles in 28.35 grams of glycine first let's find the molecular mass by adding up the atomic masses of all the atoms in the molecule using the molecular formula of c2h5o2n 2 times 12 for the two carbons 1 times 5 for the hydrogens two oxygens and one nitrogen will give us a total mass of 75 which if expressed in atomic mass units will be the molecular mass but if expressed in grams per mole it will represent the molar mass or the mass of one mole of glycine molecules again we can use dimensional analysis to convert this Mass into moles putting moles on the top and grams on the bottom and then doing the arithmetic we will get 0.38 moles of glycine we can go the other way as well let's say we are looking at Vitamin C which has the molecular formula c6h8o6 we might know that the daily allowance of vitamin C for children is 1.42 times 10 to the negative 4 moles but this number would be much more practical to know in grams so let's convert once again adding up the atomic masses of all the atoms in the molecule we can get a molar mass of 176 grams per mole if we multiply r value in moles by this conversion factor we can see that moles cancel and we will get an answer of 0.025 grams of vitamin C which isn't too much when you think about it and now we can convert between grams and moles for any element or compound by calculating the molar mass and doing dimensional analysis