Atomic mass
The atomic mass ("m") is the mass of an atom. Its unit is the unified atomic mass units ("abbr." u) where 1 unified atomic mass unit is defined as of the mass of a single carbon-12 atom, at rest. For atoms, the protons and neutrons of the nucleus account for nearly all of the total mass, and the atomic mass measured in u has nearly the same value as the mass number.
Mass (mass spectrometry)
The molecular mass (abbreviated M) of a substance, formerly also called molecular weight and abbreviated as MW, is the mass of one molecule of that substance, relative to the unified atomic mass unit u (equal to 1/12 the mass of one atom of C). Due to this relativity, the molecular mass of a substance is commonly referred to as the relative molecular mass, and abbreviated to M.