Reactants are seldom mixed in exactly the ratio of their coefficients. Take six hydrogen molecules and two oxygen molecules: the equation \mathrm{2H_2 + O_2 \longrightarrow 2H_2O} uses hydrogen and oxygen in the ratio 2 : 1, but here the ratio is 3 : 1.
The two oxygen molecules react with four hydrogen molecules and give four water molecules. Then no oxygen is left, so the reaction stops, and two hydrogen molecules remain unchanged.
The reactant that is used up first is called the limiting reactant, and the other is said to be in excess. The amount of product depends only on the limiting reactant.
Six test tubes each hold 20.0 mL of 1.00 mol/L hydrochloric acid, which is 0.0200 mol of \mathrm{HCl}. Magnesium ribbon from 0.0500 g to 0.300 g is added, and a balloon on each tube collects the hydrogen: \mathrm{Mg + 2HCl \longrightarrow MgCl_2 + H_2}.
In the first four tubes all the magnesium dissolves, and the balloons grow in proportion to the mass of magnesium. In the last two the balloons stop at the same size, and some magnesium stays at the bottom.
The acid, 0.0200 mol of \mathrm{HCl}, can dissolve only 0.0100 mol of magnesium, which is 0.243 g. Beyond this mass the acid is the limiting reactant, and the extra magnesium has nothing left to react with.
Plotting the volume of hydrogen, converted to 0 °C and 1.013 × \mathrm{10^5} Pa, against the mass of magnesium gives two straight lines: one rising from the origin and one that is flat.
Along the rising line magnesium is the limiting reactant, and every 0.0243 g of magnesium adds 22.4 mL of hydrogen. Along the flat line the acid is the limiting reactant, so the volume stays at 0.0100 mol × 22.4 L/mol = 224 mL.
The lines meet at 0.243 g, where magnesium and \mathrm{HCl} are in exactly the ratio 1 : 2 and neither is left over. Reading this point from such a graph is one way to find how much acid a solution holds.
To find the limiting reactant by calculation, compare what each reactant needs with what is there. With 0.0150 mol of magnesium and 0.0200 mol of \mathrm{HCl}, the magnesium would need 2 × 0.0150 = 0.0300 mol of \mathrm{HCl}, more than there is.
So the acid runs out first. All 0.0200 mol of \mathrm{HCl} reacts with 0.0100 mol of magnesium, giving 0.0100 mol of magnesium chloride and 0.0100 mol of hydrogen.
Writing the amounts before the reaction, the change and the amounts after the reaction in three rows keeps the calculation clear. After the reaction 0.0050 mol of magnesium, 0.12 g, is left over.
At the same temperature and pressure, gases also react in the ratio of their coefficients by volume. A tube over water holds 10.0 mL of methane and 30.0 mL of oxygen, and a spark starts the reaction \mathrm{CH_4 + 2O_2 \longrightarrow CO_2 + 2H_2O}.
The methane needs only 20.0 mL of oxygen, so 10.0 mL of oxygen is left over and 10.0 mL of carbon dioxide forms. After cooling back to the starting temperature, the water is a liquid with almost no volume.
The gas shrinks from 40.0 mL to 20.0 mL, half carbon dioxide and half oxygen. Passing it through sodium hydroxide solution would remove the carbon dioxide and leave 10.0 mL of oxygen.