Percentages#
Percentages express how large one quantity is relative to another quantity; so for example percentage yields express how large the yield of a reaction is compared to the theoretical yield. A percentage of a quantity is a way of expressing a number as a fraaction of 100. The symbol for percentage is %.
In general, if we have quantities \(x\) and \(y\) and we want to express how large \(x\) is compared to \(y\) (i.e., what percentage is \(x\) of \(y\)?), we can use the formula:
Example
What percentage is 8 of 160?
Solution:
In Python, this looks like:
8 / 160 * 100
5.0
We may also want to calculate the percentage of a quantity, for example, what is 28 % of 132? In general, we can use the formula:
Example
What is 28% of 132?
Solution:
28 / 100 * 132
36.96
Esterification Yield
In the esterification reaction:
The reactants combine in the following proportions based on their molar masses: 32 g of CH3OH reacts with 60 g of CH3COOH to form 74 g of the ester product.
In a particular reaction, 1.8 g of methanol is mixed with an excess of ethanoic acid. At the end of the experiment 2.6 g of the ester is extracted. What is the percentage yield?
Solution: First, we need to calculate the theoretical maximum yield:
From the question, we know that 32 g of CH3OH yields 74 g of ester.
Dividing through by 32 gives us that 1 g of CH3OH yields \(\frac{74}{32}\) g of ester.
Multiplying by 1.8 gives use that 1.8 g of CH3OH yields \(1.8 \times \frac{74}{32} = 4.2 \) g of ester (to on decimal point).
We know from the question that the actual yield is 2.6 g, so using the percentage yield formula, we have:
In Python, we can store the theoretical maximum yield as a variable to be reused.
theoretical_maximum_yield = 1.8 * 74 / 32
percentage_yield = 2.6 / theoretical_maximum_yield * 100
percentage_yield
62.462462462462454
Notice, that by using Python variables, we can avoid carrying rounding errors through our calculation.