My favorite cookie recipe (whole wheat chocolate chip cookies with cashews) says that it will make 48 cookies, and yet I've never gotten more than 30 when I make them. That means I'm only getting 62.5% of the number of cookies I'm supposed to. You can probably guess that this is entirely my fault I scoop too much cookie dough per cookie onto the baking sheet. That explanation is true, but it doesn't change the fact that I didn't get as many cookies as I expected.
In chemistry, chemical equations give us a "recipe" for various chemical reactions. We use stoichiometry (a fancy word that really just means "math") to calculate how much of a chemical we expect to make, based on that chemical equation and how much of the reactants we use to start. Life would be easy if every reaction gave us exactly what we expected, but the reality is that chemists pretty much never get 100% of the products they expect. There are numerous reasons for this, all of which are valid, but nevertheless leave us with less product than desired. Some chemical reactions simply do not go to completion, because the reaction also runs in reverse. Sometimes there are side reactions other reactions that take place at the same time, so that some of the reactants make a product other than the one we wanted. Sometimes the chemist makes a mistake, anything - which may include measuring a chemical incorrectly, sloshing some of the solution out of a beaker, sneezing into the reaction mixture, heating the mixture too intensely, or perhaps not stirring the mixture long enough can throw off the final results.
Experimental errors (mistakes made by the chemist, or caused by limitations of the equipment) can be avoided to some extent, but chemical causes, such as side reactions and equilibrium processes, are an inherent part of the reaction. As a result, they are always present, and have a predictable result on the amount of product produced.
To calculate percent error is simple. Divide the amount of product actually made by the amount of product expected (known as the theoretical yield, it is found using stoichiometry read Helium's "An Introduction to Stoichiometry" if you don't know how to do this) and multiply the result by 100%. In equation form, it looks like this:
[Percent Yield] = ( [actual yield] / [theoretical yield] ) * 100%
Here's a quick example:
A certain chemical reaction was expected to produce 88.7 grams of the new wonder drug Miraculosum. When the lab actually tried the process out, only 13.4 grams of Miraculosum were collected.
The percent yield is ( 13.4 / 88.7 ) x 100% = 15.1%
Now, suppose that the company tried the experiment again, and found that every time they got the same percent yield, 15.1%. They probably wouldn't be thrilled, since the chemicals needed to make their drug are expensive, but management realizes that all they have to do is charge more for Miraculosum and they'll still turn a profit. To meet production needs, however, they're going to have to figure out how much of their reactants (the ingredients) they need to make the desired amount of product. Now simple stoichiometry isn't enough, they have to take into account the percent yield as well.
Let's make up a chemical equation for the synthesis of Miraculosum:
1 pseudosterol + 2 fakelement -> 1 Miraculosum
Let's imagine that demand for Miraculosum is high, they have to produce 90 kilograms (90,000 grams) of the stuff to fill their first order. Since this is an imaginary compound, we don't have a molar mass for it, but we can pretend that the molar mass is 300 grams per mole, and use that to calculate that they need to make 300 moles of Miraculosa. (You always have to work in moles for stoichiometry, remember.)
If the reaction gave 100% yield, life would be simple. They could take 300 moles of pseudosterol and 600 moles of fakelement and rest assured that they'd get all the product they desired. Because the reaction only gives 15.1%, this won't work. It would only give us 15.1% of 300 moles, which is 45.3 moleshardly enough to fill the order.
To get the right amount of reactants, we'll have to work backwards a little. We know that we will only get 15.1% yield. We also know that we want to make 300 moles of Miraculosum. Putting those two things together means that 300 moles has to be 15.1% of the amount we were supposed to get from the reaction (the theoretical yield).
[Percent Yield] = ( [actual yield] / [theoretical yield] ) * 100%
Filling in the things we know gives:
[15.1%] = ( [ 300 moles ] / [theoretical yield ] ) * 100%
Solving for [theoretical yield] gives:
[theoretical yield] = 1987 moles
Knowing this, we can then use stoichiometry to find out how much of the reactants are needed to make 1987 moles of Miraculosa if only the reaction were 100% efficient, but that will actually make our 300 moles instead.
pseudosterol: 1987 moles x 1 / 1 = 1987 moles
fakelement: 1987 moles x 2 / 1 = 3974 moles
You should be aware that while this particular drug is imaginary, drug companies really are affected by percent yields, and that contributes to the price of prescription drugs. (Research costs do too, of course, but the point is that drug companies don't charge those prices just because they're greedy extortionists who want to get rich. They may very well be greedy extortionists who want to get rich, but they're also working to pay the high costs of producing expensive chemicals with low percent yields.)
The last thing to address with percent yields is that sometimes a series of reactions is needed to produce the final product. Every reaction has its own percent yield associated with it, so that step one may only give 50% yield, step two may give 20% yield, and step three may give 70% yield. What this means is that the final yield is going to be only 70% of 20% of 50% of the theoretical yield, based on the original amount. Calculating the actual yield at every step of the reaction would be tedious, however, so instead we wait until the very end to calculate the overall percent yield and the actual yield that results. That probably made very little sense written out, so here's an easy example:
This (fake) series of reactions is needed to make the final product Feeblebreath:
2 Alfalfalene -> 1 yumarol (50% yield)
1 yumarol + 1 mintalloy -> 1 garglene (20% yield)
2 gargalene + (secret catalyst) -> 1 Feeblebreath (70% yield)
Stoichiometry (not shown) dictates that we ought to get 60 grams of Feeblebreath product, if the reaction has 100% yield.
The reaction does not have 100% yield, instead, it has 50, 20, and 70% yields, which must be combined.
To combine percentages, multiply them together in decimal form, and then convert back to a percent. (50% = 0.50, 20% = 0.20, 70% = 0.70)
0.50 x 0.20 x 0.70 = 0.07 = 7%
This means the overall percent yield for these three reactions will only be 7%.
The manufacturers expected to get 60 grams, theoretically, but the actual yield will be 7% of 60 grams.
60 grams x 0.07 = 4.2 grams
Only 4.2 grams of Feeblebreath are actually made.
In practice, chemical companies try to make their products in as few steps as possible for exactly this reason. The more steps involved, the lower the percent yield. It is also important that every step have as high a percent yield as possible, for, as you see, having even one small (20%) yield really impacts the final result.
You may also wish to further your knowledge of stoichiometry with the Helium articles:
"An Introduction to Stoichiometry" and
"Finding the Limiting Reactant".