The chemistry
A balanced equation gives the mole ratio of reactants. Starting with more moles of one substance does not necessarily mean it is in excess, because the reaction may use different numbers of moles of the two substances. For mass-to-mole calculations use Ar for an atom and Mr for a molecule or compound.
To find which reactant runs out first, divide the amount in moles of each reactant by its balancing number. The smaller result limits the reaction. If the values are equal, the mixture has exactly the required mole ratio.
Once you have the limiting amount, use the product coefficient to find the maximum amount of product. Multiplying by the product Mr gives its theoretical mass. This assumes the reaction reaches completion without side reactions or other losses.
The unused reactant is the one in excess. Calculate how many moles of it react, using the equation, and subtract from its starting amount. Adding more of a reactant already in excess does not increase the theoretical product while the limiting amount stays fixed.
AQA assesses limiting reactants at Higher tier. Edexcel includes explaining the effect of the reactant not in excess at both tiers. Edexcel Foundation questions here supply the mole amounts so the reasoning can be practised separately from the longer calculations.
Worked example
2Mg + O₂ → 2MgO. Suppose you have 0.060 mol Mg and 0.040 mol O₂. Dividing by the balancing numbers gives 0.030 for Mg and 0.040 for O₂, so Mg is limiting.
The equation produces two moles of MgO per mole of reaction as written. The maximum MgO amount is 0.060 mol, with mass 0.060 × 40 = 2.40 g. Oxygen consumed is 0.030 mol, leaving 0.010 mol unused.
Specification references
AQA GCSE Chemistry 8462 section 4.3.2.4 (Higher only). Pearson Edexcel GCSE Chemistry 1CH0 Issue 4 sections 1.48, 1.51 and 1.52 (not designated Higher only).