The predicted yield is determined by the masses used in a reaction and the mole ratios in the balanced equation. This predicted yield is the "ideal". It is not always possible to get this amount of product. Reactions are not always simple. There often are competing reactions.
For example, if you burn carbon in air you can get carbon dioxide and carbon monoxide formed. The two reactions occur simultaneously. Some carbon atoms end up in CO and others end up in CO2. The typical calculation in a starting class assumes that there is only one path for the reactants. This is an over simplification.You know for example from real life that food is not always converted to energy. If you eat a cookie, some of it could end up stored as "fat" Ugh!
Chemists, like all other people, aren't perfect. When a chemist does a synthesis, she will end up creating less product than expected because of spills, incomplete reactions, incomplete separations, or a dozen other reasons. The percent yield is a way of measuring how successful a reaction has been.
To compute the percent yield, figure out how much product you should have made by using basic stoichiometry. (Note: this may involve a limiting reagent problem.) Then simply divide the amount of stuff you did form by the expected amount and multiply by 100%. If you get a number > 100%, you've made a serious error someplace.
Obviously, you want a high percent yield: if you have a ten step synthesis where the product from one reaction ends up as the reactants for the next and each synthesis has 90% yield, you'll end up with only ~35% yield for the overall reaction.
Example: You burn 10.0 grams of methane in an excess of oxygen and form 19.8 grams of water. What was your percent yield?
Solution : First, you need to find out how much product you would expect to make using basic stoichiometry. The reaction of methane with oxygen is shown below
CH4(g) + 2O2(g) -> CO2(g) + 2H2O(g)
You start with 10.0 grams of methane, which has a molecular weight of 16.04 g/mole, so you have 10.0 g/16.04 g/mole = 0.623 moles of methane.
The ratio between methane and water is 2 water for every 1 methane, so you expect to form
0.623 moles CH4 * 2 moles H2O/1 mole CH4 1.25 moles H2O
Now convert back to grams: the mole weight of water is 18.02 g/mole, so you should form
1.25 moles H2O * 18.02 g/mole = 22.5 g water
If the reaction had gone perfectly. You only formed 19.8 however, so your percent yield is
% yield = mass created/mass expected * 100%
% yield = 19.8 g/22.5 g = 88.0%