Choosing the route
You now know both formulae. Only one thing is left: which one to use when.
Ask this first
What am I given, and what am I asked for?
Two of the three — grams, moles, particles — appear in every problem. Mark which one you have and which one is wanted, and the rest is straightforward.
A mixed set
Relative masses: H = 1, C = 12, N = 14, O = 16, Mg = 24, Ca = 40.
12 g of magnesium
M = 24 g mol-1
n = 12 g ÷ 24 g mol-1 = 0.5 mol
10 g of calcium carbonate
CaCO3 = 40 + 12 + (3 × 16) = 100, so M = 100 g mol-1
n = 10 g ÷ 100 g mol-1 = 0.1 mol
Molecules in 5 moles of carbon dioxide
number of molecules = 5 × 6.022 × 1023
= 3.011 × 1024
Molecules in 4 moles of water
number of molecules = 4 × 6.022 × 1023
= 2.409 × 1024
Mass of 2 moles of urea
CO(NH2)2 = 12 + 16 + (2 × 14) + (4 × 1) = 60
m = n × M = 2 mol × 60 g mol-1
= 120 g
Here the formula is reversed: moles were given and a mass asked for, so it is a multiplication rather than a division. The bracket is what tells you urea has two N and four H.
Pulling the chapter together
An atom cannot be weighed. But measure everything against carbon-12 and you get relative masses; weigh that number out in grams and you have 6.022 × 1023 particles; call that a mole. The balance becomes the counting instrument.