Electrons do have some mass, but it is almost 2000 times less than the mass of a proton. There aren't enough electrons in any of the atoms we know about to affect the total mass; therefore, the total mass is equal to the sum of the protons and the neutrons in an atom.