How can the atomic mass of an element be calculated?

However, if an element is diatomic (like ${\text{Br}}_{2}$), you'll have to double its molar mass.