What is the formula for finding the average atomic mass of an element based on the abundance of its isotopes?

In my class my teacher showed us how to find the average atomic mass of an element with a method, but he didn't really state a formula one could use. I came up with a formula of my own, and from what I observed it works: $$\frac{i_1x + i_2y}{100} = A,$$ where $$A$$ is the atomic mass, $$i_1$$ is the first isotope's atomic weight, $$i_2$$ is the second isotope's atomic weight, $$x$$ and $$y$$ are the percentages of the isotopes, respectively, and they add up to 100, i.e. $$x+y = 100$$.

Therefore: $$\frac{i_1x + i_2(100-x)}{100} = A$$

I'm just wondering, is there an official formula, or is this method it?

• Have you studied weighted averages before? It's exactly that type of mathematics. Mar 7 '14 at 22:08
• In my class we just did three questions. My teacher would give us an element such as Rubidium, the isotope's atomic mass, and the percentage of one isotope, then we would have to find the atomic mass. Or he would give us enough information to find another variable in my equation. (When I see my equation I'm not saying I made it, it's probably out there somewhere, I just don't know where) Mar 7 '14 at 22:12

The average relative atomic mass of an element comprised of $$n$$ isotopes with relative atomic masses $$A_i$$ and relative fractional abundances $$p_i$$ is given by:

$$A = p_1 A_1 + p_2 A_2 + \dots + p_n A_n = \sum\limits_{i=1}^n p_i A_i$$

For example carbon:

$$\begin{array}{lrrr} \text{Isotope} & \text{Isotopic Mass A} & \text{Abundance p} & A\times p\\\hline \ce{^{12}C}: & \pu{12.000000 u} & 0.98892 &= \pu{11.867 u}\\ \ce{^{13}C}: & \pu{13.003354 u} & 0.01108 &= \pu{00.144 u} \end{array}$$

Since we have $$p_1A_1$$ and $$p_2A_2$$, we add those together to find $$A$$, therefore the chemical relative atomic mass of carbon is $$A = \pu{00.144 u} + \pu{11.867 u} = \pu{12.0011 u}.$$

Once you know how it works, you never want to do that by hand again. For example for bromine you can use this python code:

isotopes = [79, 81]
abundances = [50.69, 49.31]

weighted = map(lambda x, y: x * y, isotopes, abundances)
# multiply isotope mass and abundance

weighted = sum(weighted)/100
# sum them up and divide by 100

print weighted
>>>> 79.9862