The atomic weight of an element is calculated as the weighted average of the masses of its naturally occurring isotopes. The isotopes are, in simplest terms, forms of an element that have the same atomic number (i.e. same number of protons), but different atomic weight (i.e. different number of neutrons). For example, uranium has two isotopes, U-235 and U-238. To calculate the atomic weight of an element, we need the relative abundance data of all the naturally occurring isotopes of that element. So, lets say, U-238 has a relative abundance of 93% and U-235 has relative abundance of 7%. Then the atomic weight of uranium will be 0.93x238 + 0.07x235 = 237.79 gm/mole. One can similarly calculate the atomic weight of any other element.

hope this helps.