The stoichiometry of a reaction is the ratio in which the substances react and form. It is shown by the balancing numbers in the equation. You can deduce it from the masses of the reactants and products, because moles, not masses, are in simple ratios.
The method has three steps. First, divide the mass of each substance by its relative mass to find the number of moles. Second, divide every number of moles by the smallest number of moles to find the simplest whole-number ratio. Third, write the ratio as the balancing numbers in the equation.
Example: 2.4 g of magnesium reacts with 1.6 g of oxygen to make 4.0 g of magnesium oxide. The relative atomic mass of magnesium is 24, so 2.4 g is 0.1 mol. Oxygen molecules, O2, have a relative formula mass of 32, so 1.6 g is 0.05 mol. Magnesium oxide, MgO, has a relative formula mass of 40, so 4.0 g is 0.1 mol. Dividing by 0.05 gives a ratio of 2 : 1 : 2, so the equation is 2Mg + O2 → 2MgO.
Sometimes the ratio does not come out as whole numbers straight away. If a value is close to a half, such as 1.5, multiply every value by 2 to get whole numbers.