To calculate percent by mass, you need to determine two things: the mass of just the element, and the molar mass of the whole compound. Then, you take the molar mass of just the element and divide it by the molar mass of the whole compound, and times by 100%!!!