How to Calculate Molar Mass When a Formula Contains Brackets

Learn how to count atoms inside brackets, apply subscripts correctly, and calculate molar mass using worked HSC Chemistry examples. Practise converting between mass, moles, formula units, and the number of ions.

Imagine a student is asked to calculate the molar mass of magnesium nitrate, \(\ce{Mg(NO3)2}\). They count one magnesium atom, one nitrogen atom, and three oxygen atoms, giving:

\[ 24.31+14.01+3(16.00)=86.32\ \mathrm{g\,mol^{-1}} \]

Something is wrong. Before checking the arithmetic, consider this: does the small 2 outside the brackets multiply only the oxygen atoms, or the entire \(\ce{NO3}\) group?

It multiplies the entire group. The correct formula contains one Mg atom, two N atoms, and six O atoms. Its molar mass is therefore:

\[ \begin{aligned} MM(\ce{Mg(NO3)2}) &=24.31+2(14.01)+6(16.00)\\ &=148.33\ \mathrm{g\,mol^{-1}} \end{aligned} \]

That is the key rule: multiply every atom inside the brackets by the subscript outside the brackets, then add the mass contributions of all the atoms.

0101 What do brackets actually mean in a chemical formula?

Brackets group atoms together. A subscript written outside those brackets tells you how many times the entire group is repeated.

Think of a bracketed group as a multipack. If a box contains three bottles and you buy two boxes, you have six bottles, not three.

The same counting principle applies to chemical formulae. The analogy is only about counting: atoms and ions aren’t necessarily arranged in physical packages inside a compound.

Consider magnesium nitrate:

\[ \ce{Mg(NO3)2} \]

The formula contains one magnesium atom outside the brackets. Inside the brackets, there is one nitrogen atom and three oxygen atoms.

The subscript 2 means there are two copies of the entire nitrate group.

ElementCounting calculationAtoms per formula unit
Mg11
N\(1\times2\)2
O\(3\times2\)6

Notice that the 2 does not affect magnesium. Magnesium is outside the brackets.

It also multiplies the oxygen subscript. You cannot multiply the nitrogen but forget the oxygen.

The three bracket rules to remember

  1. A subscript outside brackets multiplies every atom inside them.
  2. A subscript inside brackets is also multiplied by the outside subscript.
  3. Atoms outside the brackets are unaffected.

For example, consider calcium phosphate:

\[ \ce{Ca3(PO4)2} \]

The calcium is outside the brackets, so there are three calcium atoms.

Inside the brackets, there is one phosphorus atom and four oxygen atoms. The outside 2 multiplies both:

  • Calcium: \(3\) atoms
  • Phosphorus: \(1\times2=2\) atoms
  • Oxygen: \(4\times2=8\) atoms

The complete atom count is therefore:

\[ \ce{Ca3(PO4)2}: \quad 3\mathrm{Ca},\ 2\mathrm{P},\ 8\mathrm{O} \]

A useful habit is to expand the atom counts before touching your calculator.

0202 Turning the atom count into molar mass

Once you know how many atoms of each element are present, calculating molar mass is straightforward.

You need the relative atomic masses from the periodic table.

For example:

ElementRelative atomic mass
Calcium (Ca)40.08
Oxygen (O)16.00
Hydrogen (H)1.008
Magnesium (Mg)24.31
Nitrogen (N)14.01

For each element, multiply its atomic mass by the number of atoms in the formula. Then add all the contributions.

In general:

\[ MM=\sum(\text{atom count}\times\text{atomic mass}) \]

The final unit is \(\mathrm{g\,mol^{-1}}\), meaning grams per mole.

The sum of the relative atomic masses is also called the relative formula mass for an ionic compound. It is dimensionless, whereas molar mass includes the unit \(\mathrm{g\,mol^{-1}}\). Their numerical values are the same.

Worked example: Calculate the molar mass of calcium hydroxide

Calculate the molar mass of calcium hydroxide, \(\ce{Ca(OH)2}\).

Use:

  • Ca = 40.08
  • O = 16.00
  • H = 1.008

Step 1

The formula contains one calcium atom and two hydroxide groups.

Each hydroxide group, \(\ce{OH}\), contains one oxygen atom and one hydrogen atom.

Therefore:

ElementNumber of atoms
Ca1
O2
H2

Step 2

\[ \begin{aligned} \text{Ca contribution}&=1(40.08)=40.08\\ \text{O contribution}&=2(16.00)=32.00\\ \text{H contribution}&=2(1.008)=2.016 \end{aligned} \]

Step 3

\[ \begin{aligned} MM(\ce{Ca(OH)2}) &=40.08+32.00+2.016\\ &=74.096\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Therefore:

\[ MM(\ce{Ca(OH)2})=74.10\ \mathrm{g\,mol^{-1}} \]

One mole of calcium hydroxide formula units has a mass of approximately 74.10 g.

0303 What exactly are you counting?

There is another detail worth getting right before using molar mass in calculations.

A mole counts specified chemical entities. Depending on the substance, those entities can be atoms, molecules, ions, or formula units.

For ionic compounds such as calcium hydroxide and magnesium nitrate, the appropriate entity is a formula unit.

A formula unit represents the simplest whole-number ratio of ions in the compound. It does not represent a separate molecule floating around in the solid.

For example, one formula unit of \(\ce{Ca(OH)2}\) contains:

  • One \(\mathrm{Ca}^{2+}\) ion.
  • Two \(\mathrm{OH}^{-}\) ions.

Therefore, one mole of \(\ce{Ca(OH)2}\) formula units contains one mole of calcium ions and two moles of hydroxide ions.

This distinction becomes important when a question asks for the number of ions rather than the number of formula units.

Connecting mass, moles, and number of particles

Three quantities are connected:

QuantitySymbolUnit
Mass\(m\)g
Chemical amount\(n\)mol
Molar mass\(MM\)\(\mathrm{g\,mol^{-1}}\)

The relationship between mass, amount, and molar mass is:

\[ n=\frac{m}{MM} \]

Check the units:

\[ \frac{\mathrm{g}}{\mathrm{g\,mol^{-1}}} =\mathrm{mol} \]

The grams cancel, leaving moles.

To convert moles into a number of entities, use Avogadro’s constant:

\[ N=nN_A \]

where:

  • \(N\) is the number of specified entities.
  • \(n\) is the chemical amount in moles.
  • \(N_A\) is Avogadro’s constant, approximately \(6.022\times10^{23}\ \mathrm{mol^{-1}}\).

The complete pathway is:

\[ \boxed{ \text{mass} \longrightarrow \text{moles} \longrightarrow \text{number of entities} } \]

Be specific about the entity. If you have an ionic compound, your first calculation gives the number of formula units, not automatically the number of individual ions.

0404 Worked example: From a bracketed formula to the number of formula units

Now combine bracket counting, molar mass, and Avogadro’s constant.

A laboratory sample contains 15.5 g of pure, anhydrous calcium phosphate, \(\ce{Ca3(PO4)2}\).

Calculate:

a) The molar mass of calcium phosphate.

b) The number of formula units in the sample.

Use:

  • Ca = 40.08
  • P = 30.97
  • O = 16.00

Step 1

The formula is:

\[ \ce{Ca3(PO4)2} \]

The calcium subscript is 3.

The phosphate group contains one phosphorus and four oxygen atoms. The outside subscript 2 multiplies both:

\[ \begin{aligned} \mathrm{Ca}&=3\\ \mathrm{P}&=1\times2=2\\ \mathrm{O}&=4\times2=8 \end{aligned} \]

Step 2

\[ \begin{aligned} MM(\ce{Ca3(PO4)2}) &=3(40.08)+2(30.97)+8(16.00)\\ &=120.24+61.94+128.00\\ &=310.18\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Step 3

We know the mass and molar mass, so:

\[ n=\frac{m}{MM} \]

Substitute:

\[ \begin{aligned} n &=\frac{15.5\ \mathrm{g}} {310.18\ \mathrm{g\,mol^{-1}}}\\ &=0.04997\ \mathrm{mol} \end{aligned} \]

To three significant figures:

\[ n=0.0500\ \mathrm{mol} \]

Step 4

\[ N=nN_A \]

\[ \begin{aligned} N &=0.0500\times6.022\times10^{23}\\ &=3.01\times10^{22} \end{aligned} \]

Therefore, the sample contains:

\[ 3.01\times10^{22} \text{ formula units of }\ce{Ca3(PO4)2} \]

Notice that one formula unit contains two phosphate ions. Therefore, the sample also contains twice as many phosphate ions:

\[ 6.02\times10^{22} \text{ phosphate ions} \]

The number of formula units and the number of constituent ions are different quantities. Always check what the question actually asks you to count.

0505 A common trap: Bracket subscripts versus coefficients

Consider these two expressions:

\[ \ce{Ca(OH)2} \]

and

\[ \ce{2Ca(OH)2} \]

They look similar, but the numbers have different jobs.

The subscript 2 after the bracket belongs to the chemical formula. It tells you that each formula unit contains two hydroxide groups.

The coefficient 2 in front of the formula applies to the entire substance.

In a balanced chemical equation, it represents two moles of formula units in the stoichiometric ratio.

This distinction is important:

NumberPositionMeaning
Subscript 2After the bracketTwo copies of the bracketed group
Coefficient 2Before the formulaTwo formula units, or two moles in the mole ratio

The coefficient does not change the molar mass.

For calcium hydroxide:

\[ MM(\ce{Ca(OH)2})=74.10\ \mathrm{g\,mol^{-1}} \]

This remains the molar mass even if the equation contains:

\[ \ce{2Ca(OH)2} \]

If you have two moles of calcium hydroxide, the mass is:

\[ m=n\times MM \]

\[ m=2.00\times74.10 =148.2\ \mathrm{g} \]

The molar mass is still \(74.10\ \mathrm{g\,mol^{-1}}\). You simply have twice as much of the substance.

0606 Common mistakes to avoid

Before moving into exam questions, check these frequent errors.

MistakeCorrect approach
Multiplying only the last element inside bracketsMultiply every element inside the brackets
Forgetting subscripts already inside bracketsMultiply the internal subscripts as well
Multiplying atoms outside the bracketsOnly multiply atoms inside the bracketed group
Treating a coefficient as part of the formulaCoefficients change the amount, not molar mass
Calling an ionic formula unit a moleculeIdentify whether the substance is ionic or molecular
Giving molar mass in gramsUse \(\mathrm{g\,mol^{-1}}\)

One final point about experimental measurements: a balance measures mass, not chemical composition. The calculations in this article assume that the sample is pure and that its formula is known.

If a sample is a hydrate, its water molecules must also be included in the molar mass. For example, the formula of hydrated copper sulfate includes water as well as the copper sulfate component. You cannot simply ignore the water because it appears after a dot rather than inside ordinary brackets.

For further practice with the underlying calculations, see:

07Questions and solutions

Question 1

Calculate the molar mass of barium hydroxide, \(\ce{Ba(OH)2}\).

Use:

  • Ba = 137.33
  • O = 16.00
  • H = 1.008

Solution 1

The molar mass of barium hydroxide is \(171.35\ \mathrm{g\,mol^{-1}}\).

The formula contains one barium atom and two hydroxide groups.

Therefore:

  • Ba = 1 atom
  • O = 2 atoms
  • H = 2 atoms

Multiply each atom count by its relative atomic mass:

\[ \begin{aligned} MM(\ce{Ba(OH)2}) &=137.33+2(16.00)+2(1.008)\\ &=137.33+32.00+2.016\\ &=171.346\ \mathrm{g\,mol^{-1}} \end{aligned} \]

To five significant figures:

\[ MM=171.35\ \mathrm{g\,mol^{-1}} \]

The important step was recognising that the outside subscript 2 applies to both oxygen and hydrogen.

Question 2

A pure, anhydrous sample of iron(III) sulfate, \(\ce{Fe2(SO4)3}\), has a mass of 20.0 g.

Calculate:

a) The molar mass of iron(III) sulfate.

b) The number of formula units in the sample.

Use:

  • Fe = 55.85
  • S = 32.06
  • O = 16.00

Solution 2

The molar mass is \(399.88\ \mathrm{g\,mol^{-1}}\), and the sample contains \(3.01\times10^{22}\) formula units.

First, count the atoms.

The formula contains two iron atoms outside the brackets.

Inside the brackets, each sulfate group contains one sulfur and four oxygen atoms. There are three sulfate groups.

Therefore:

ElementAtom count
Fe2
S\(1\times3=3\)
O\(4\times3=12\)

Calculate the molar mass:

\[ \begin{aligned} MM(\ce{Fe2(SO4)3}) &=2(55.85)+3(32.06)+12(16.00)\\ &=111.70+96.18+192.00\\ &=399.88\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Now calculate the chemical amount:

\[ \begin{aligned} n &=\frac{m}{MM}\\ &=\frac{20.0\ \mathrm{g}} {399.88\ \mathrm{g\,mol^{-1}}}\\ &=0.05002\ \mathrm{mol} \end{aligned} \]

To three significant figures:

\[ n=0.0500\ \mathrm{mol} \]

Finally, calculate the number of formula units:

\[ \begin{aligned} N &=nN_A\\ &=0.0500\times6.022\times10^{23}\\ &=3.01\times10^{22} \end{aligned} \]

The sample therefore contains \(3.01\times10^{22}\) formula units.

Remember that each formula unit contains three sulfate ions. If the question had asked for the number of sulfate ions, you would multiply the formula-unit count by three.

Question 3

A student is calculating the molar mass of ammonium carbonate, \(\ce{(NH4)2CO3}\).

They write the following atom count:

  • N = 2
  • H = 4
  • C = 1
  • O = 3

They then calculate the molar mass using those values.

a) Identify the student’s mistake.

b) Calculate the correct molar mass.

c) A 4.80 g sample is available. Calculate the number of ammonium ions, \(\ce{NH4+}\), in the sample.

Use:

  • N = 14.01
  • H = 1.008
  • C = 12.01
  • O = 16.00

Solution 3

The correct atom count is N = 2, H = 8, C = 1, and O = 3. The molar mass is \(96.094\ \mathrm{g\,mol^{-1}}\), and the sample contains \(6.02\times10^{22}\) ammonium ions.

The student’s mistake is forgetting that the outside subscript 2 multiplies every atom inside the brackets.

In particular, it multiplies the four hydrogen atoms as well as the nitrogen atom.

The correct atom count is:

ElementCalculationCount
N\(1\times2\)2
H\(4\times2\)8
C11
O33

Step 1: Calculate the correct molar mass.

\[ \begin{aligned} MM(\ce{(NH4)2CO3}) &=2(14.01)+8(1.008)\\ &\quad+12.01+3(16.00)\\ &=28.02+8.064+12.01+48.00\\ &=96.094\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Step 2: Calculate the number of moles in the sample.

\[ \begin{aligned} n &=\frac{4.80\ \mathrm{g}} {96.094\ \mathrm{g\,mol^{-1}}}\\ &=0.04995\ \mathrm{mol} \end{aligned} \]

This is approximately \(0.0500\) mol of ammonium carbonate formula units.

Step 3: Work out how many ammonium ions are present.

Each formula unit contains two ammonium ions.

Therefore:

\[ n(\ce{NH4+})=2(0.04995) \]

\[ n(\ce{NH4+})=0.0999\ \mathrm{mol} \]

Step 4: Convert the amount of ammonium ions into a number of ions.

\[ \begin{aligned} N &=0.0999\times6.022\times10^{23}\\ &=6.02\times10^{22} \end{aligned} \]

The sample contains approximately \(6.02\times10^{22}\) ammonium ions.

Notice the two different counts:

  • Formula units: approximately \(3.01\times10^{22}\).
  • Ammonium ions: approximately \(6.02\times10^{22}\).

The difference comes from having two ammonium ions in each formula unit.

Question 4

Aluminium hydroxide decomposes according to the balanced equation:

\[ \ce{2Al(OH)3(s) -> Al2O3(s) + 3H2O(l)} \]

A student claims that the molar mass of aluminium hydroxide is twice its usual value because the balanced equation has a coefficient of 2.

They report:

\[ MM=156.0\ \mathrm{g\,mol^{-1}} \]

Assess this claim.

Then calculate:

a) The correct molar mass of aluminium hydroxide.

b) The mass of 2.00 mol of aluminium hydroxide.

c) The number of hydroxide ions represented by 2.00 mol of aluminium hydroxide formula units.

Use:

  • Al = 26.98
  • O = 16.00
  • H = 1.008

Solution 4

The student’s claim is incorrect: the molar mass is \(78.00\ \mathrm{g\,mol^{-1}}\), not \(156.0\ \mathrm{g\,mol^{-1}}\). Two moles have a mass of 156 g and contain \(3.61\times10^{24}\) hydroxide ions.

The coefficient 2 in the balanced equation represents two moles of aluminium hydroxide relative to the other substances.

It does not change the composition of one formula unit.

Step 1: Calculate the correct molar mass.

One formula unit of \(\ce{Al(OH)3}\) contains:

  • One Al atom.
  • Three O atoms.
  • Three H atoms.

Therefore:

\[ \begin{aligned} MM(\ce{Al(OH)3}) &=26.98+3(16.00)+3(1.008)\\ &=26.98+48.00+3.024\\ &=78.004\ \mathrm{g\,mol^{-1}} \end{aligned} \]

So:

\[ MM=78.00\ \mathrm{g\,mol^{-1}} \]

Step 2: Calculate the mass of 2.00 mol.

Use:

\[ m=n\times MM \]

Substitute:

\[ \begin{aligned} m &=2.00\times78.004\\ &=156.008\ \mathrm{g}\\ &=156\ \mathrm{g} \end{aligned} \]

The student’s numerical result happens to match the mass of 2.00 mol, but it is not the molar mass.

The units expose the mistake:

  • Molar mass: \(\mathrm{g\,mol^{-1}}\).
  • Mass of 2.00 mol: \(\mathrm{g}\).

Step 3: Calculate the number of hydroxide ions.

Each formula unit contains three hydroxide ions.

Therefore, 2.00 mol of aluminium hydroxide contains:

\[ n(\mathrm{OH}^{-})=2.00\times3 \]

\[ n(\mathrm{OH}^{-})=6.00\ \mathrm{mol} \]

Convert this into a number of ions:

\[ \begin{aligned} N &=6.00\times6.022\times10^{23}\\ &=3.61\times10^{24} \end{aligned} \]

There are approximately \(3.61\times10^{24}\) hydroxide ions.

This question tests two different uses of numbers. Subscripts describe the composition of one formula unit, while coefficients describe the mole ratio in a balanced equation.

Question 5

Two laboratories each prepare a 17.1 g sample of a pure, anhydrous ionic compound.

  • Sample A contains aluminium sulfate, \(\ce{Al2(SO4)3}\).
  • Sample B contains magnesium nitrate, \(\ce{Mg(NO3)2}\).

A student argues that Sample A must contain more polyatomic ions because each formula unit contains three sulfate ions, whereas each formula unit of magnesium nitrate contains only two nitrate ions.

The student concludes that three ions must mean more ions overall than two.

Assess this argument.

Calculate the number of polyatomic ions in each sample. Then determine the mass of magnesium nitrate required to contain exactly the same number of nitrate ions as there are sulfate ions in the original 17.1 g aluminium sulfate sample.

Use:

  • Al = 26.98
  • S = 32.06
  • O = 16.00
  • Mg = 24.31
  • N = 14.01

Solution 5

The student’s argument is incorrect. The magnesium nitrate sample contains more polyatomic ions, despite having fewer polyatomic ions per formula unit. It contains approximately \(1.39\times10^{23}\) nitrate ions, compared with \(9.03\times10^{22}\) sulfate ions in the aluminium sulfate sample.

The important detail is that both samples have the same mass, not the same number of formula units.

A formula unit of aluminium sulfate is considerably heavier than a formula unit of magnesium nitrate. Therefore, the same mass of magnesium nitrate contains more formula units.

Step 1: Calculate the molar mass of aluminium sulfate.

One formula unit of \(\ce{Al2(SO4)3}\) contains:

  • 2 Al atoms.
  • 3 S atoms.
  • 12 O atoms.

Therefore:

\[ \begin{aligned} MM_A &=2(26.98)+3(32.06)+12(16.00)\\ &=53.96+96.18+192.00\\ &=342.14\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Step 2: Calculate the moles of aluminium sulfate formula units.

\[ \begin{aligned} n_A &=\frac{17.1}{342.14}\\ &=0.04998\ \mathrm{mol} \end{aligned} \]

Each formula unit contains three sulfate ions.

Therefore:

\[ n(\mathrm{SO_{4}}^{2-})=3(0.04998) \]

\[ n(\mathrm{SO_{4}}^{2-})=0.1499\ \mathrm{mol} \]

Convert this to a number of sulfate ions:

\[ \begin{aligned} N_A &=0.1499\times6.022\times10^{23}\\ &=9.03\times10^{22} \end{aligned} \]

Sample A contains approximately \(9.03\times10^{22}\) sulfate ions.

Step 3: Calculate the molar mass of magnesium nitrate.

One formula unit of \(\ce{Mg(NO3)2}\) contains:

  • 1 Mg atom.
  • 2 N atoms.
  • 6 O atoms.

Therefore:

\[ \begin{aligned} MM_B &=24.31+2(14.01)+6(16.00)\\ &=24.31+28.02+96.00\\ &=148.33\ \mathrm{g\,mol^{-1}} \end{aligned} \]

Step 4: Calculate the moles of magnesium nitrate formula units.

\[ \begin{aligned} n_B &=\frac{17.1}{148.33}\\ &=0.1153\ \mathrm{mol} \end{aligned} \]

Each formula unit contains two nitrate ions.

Therefore:

\[ n(\mathrm{NO_{3}}^{-})=2(0.1153) \]

\[ n(\mathrm{NO_{3}}^{-})=0.2306\ \mathrm{mol} \]

Convert this into a number of nitrate ions:

\[ \begin{aligned} N_B &=0.2306\times6.022\times10^{23}\\ &=1.39\times10^{23} \end{aligned} \]

Sample B contains approximately \(1.39\times10^{23}\) nitrate ions.

So Sample B contains more polyatomic ions, even though each formula unit contains fewer of them.

Step 5: Find the mass of magnesium nitrate that contains the same number of nitrate ions as the original aluminium sulfate sample.

From Step 2, the aluminium sulfate sample contains \(0.1499\) mol of sulfate ions.

We want the same amount of nitrate ions:

\[ n(\mathrm{NO_{3}}^{-})=0.1499\ \mathrm{mol} \]

Each formula unit of magnesium nitrate contains two nitrate ions.

Therefore, the required amount of magnesium nitrate formula units is:

\[ n_B=\frac{0.1499}{2} \]

\[ n_B=0.07497\ \mathrm{mol} \]

Now calculate the required mass:

\[ m=n\times MM \]

\[ \begin{aligned} m &=0.07497\times148.33\\ &=11.1\ \mathrm{g} \end{aligned} \]

Therefore, approximately 11.1 g of magnesium nitrate contains the same number of polyatomic ions as 17.1 g of aluminium sulfate.

The deeper principle is that counting ions per formula unit is not enough when comparing samples of equal mass. You must also account for the molar mass, because it determines how many formula units fit into that mass.

A useful comparison is:

\[ \text{moles of polyatomic ions} = \text{moles of formula units} \times \text{ions per formula unit} \]

This relationship connects bracket counting directly to quantitative chemistry.

0807 Where to use this skill next

Calculating molar mass from bracketed formulae is more than a periodic-table exercise. It allows you to move between the composition of a compound, its mass, and the number of particles it contains.

The next step is applying these calculations to percentage composition and stoichiometry.

For percentage composition, you use the mass contribution of each element relative to the total molar mass.

For stoichiometry, you convert a measured mass into moles of formula units, apply the mole ratio from a balanced equation, and then calculate the required product amount.

In both cases, the calculation depends on getting the original formula right. One missed bracket multiplier can change every answer that follows.