The mass of a substance and the amount of it in moles are linked through its relative formula mass, Mr. One mole of any substance has a mass in grams equal to its Mr. To find Mr, add up the relative atomic masses of all the atoms in the formula, using the values from the Periodic Table. For carbon dioxide, CO2, Mr = 12 + 16 + 16 = 44, so one mole of CO2 has a mass of 44 g.
To change a mass in grams into moles, divide the mass by the relative formula mass: moles = mass ÷ Mr. For example, 11 g of carbon dioxide is 11 ÷ 44 = 0.25 mol. To go the other way, multiply the number of moles by the Mr: mass = moles × Mr. The mass is in grams when the Mr is used in g per mol.
Worked examples. The mass of 0.50 mol of sodium hydroxide, NaOH (Mr = 40), is 0.50 × 40 = 20 g, which is half the mass of one mole. The amount in 54 g of water (Mr = 18) is 54 ÷ 18 = 3.0 mol. Give answers to a sensible number of significant figures, usually the same as the data in the question.