What is the formula for finding the average atomic mass of an element based on the abundance of its isotopes?
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} &amp; 
\text{Isotopic Mass $A$} &amp; 
\text{Abundance $p$} &amp; 
A\times p\\\hline
\ce{^{12}C}:   &amp; \pu{12.000000 u} &amp; 0.98892 &amp;= \pu{11.867 u}\\
\ce{^{13}C}:   &amp; \pu{13.003354 u} &amp; 0.01108 &amp;= \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}.$$