Magnesium chloride is a compound consisting of magnesium and chlorine. It is a white powder that is very soluble in water. It is also known as mag chloride or chloromag.

It is an **important industrial chemical**, most notably as a weed killer. Like other compounds, it can be analyzed and quantified by calculating the number of moles of Cl atoms in 3.61×1024 formula units of magnesium chloride, Mgcl2.

Cl atoms are not the only elements present in magnesium chloride, however. There are also atoms of magnesium and oxygen present. To calculate the number of moles of all elements (not just Cl) in the compound, you *must first calculate* the number of moles of Cl atoms and then multiply that number by 1 billion (1×109).

## Calculate the number of moles of Cl atoms in the compound

Now that you have the mass of the compound, you can calculate the number of chlorine atoms in the sample. You did this earlier in the tutorial when you found the number of magnesium atoms in the sample.

To do this, multiply the mass of the compound by the *relative atomic mass* (or **average atomic mass**) of Cl. Then divide by 12 because there are 12 Cl atoms in one molecule of chlorine.

This gives you the number of molecules (not ions) of chlorine in your sample. There were 3.61×1024 molecules of chlorine in your sample, which corresponds to 3.61×1023 Cl atoms!

Closing Thoughts: Now that you know how to find concentrations and masses for compounds, try some more exercises! Go back to Exercise 1 and Exercise 2 to practice more, or try some from Exercises 3 through 6.

## Divide the number of moles of Cl atoms by the number of formula units

Now that you have the number of moles of Cl atoms, you can calculate how many Cl atoms are in one formula unit of MgCl2 by dividing the total number of Cl atoms by the number of Mg atoms in one formula unit.

There are 3.61×1024 Cl atoms per mole, so there are 3.61×1024 / 56 MgCl2 formula units per mole of chlorides. There are thus 3.61×1022 MgCl2 formula units per mole of chlorides.

That is a pretty big number! Now we can use this information to find out how many grams of chlorides are in one liter of magnesium chloride solution.

There are 1,000 mL in 1 L, so there are 1000 / 3.6102×10−2 mol / L chlorides in the solution.

## Multiply by Avogadro’s constant to get the number of molecules

Now that you know how to calculate the number of atoms, molecules, and ions in a compound, you can apply this knowledge to other situations.

You can calculate the number of moles of chlorine in 3.61×1024 formula units of magnesium chloride, Mgcl2, by multiplying the number of atoms by Avogadro’s constant.

Multiply the mass in grams of Mgcl2 by the **atomic mass unit** (amu) of magnesium to get the mass in *atomic units* (ai) of magnesium. Then multiply that by Avogadro’s constant to get the number of Mg atoms in **one molecule** of MgCl2. Divide that by the amu of chlorine to get the number of Cl atoms in one molecule of MgCl2.

## Divide by the molecular mass to get the mass in grams

Now that you know how to find the number of moles of a given element in a compound, you can calculate the mass of the element in a compound using the formula above.

To do this, divide the number of moles of an element in a compound by the molecular mass of that element and you will get the mass of the element in **one molecule** of the compound.

For example, if there are fifty (50) moles of chlorine in **one hundred** (100) grams of **magnesium chloride**, then there is one (1) **mole per gram**, so 5g = 5mCl.

## Check your work

Once you have calculated the number of moles of a given element, you can check your work by calculating the mass of the element using the formula for mass percentage by element (what you calculated in step 2).

For example, if you had calculated that there were 3.61×1024 magnesium atoms in 12 g of magnesium chloride, then the mass percent magnesium would be 3.61×10−6, which matches the known mass percent of magnesium in magnesium chloride (3.6% by weight).

At this point, you have successfully calculated the number of moles of a given element and checked your work! You can now go onto the next step: calculating mole ratios.

Note: It is a good idea to check your final answer for any errors before moving on to the next step. For example, if you had accidentally calculated that there were 3.61×1024 iron atoms in 12 g of iron(III) oxide, then the **mass percent iron would** be 9% by weight, which is not correct.