All leptons, quarks, and gauge bosons can be placed in the periodic table of elementary particles. The periodic table is derived from dualities of string theory and a Kaluza-Klein substructure for the six extra spatial dimensions. As a molecule is the composite of atoms with chemical bonds, a hadron is the composite of elementary particles with hadronic bonds. The masses of elementary particles and hadrons can be calculated using the periodic table with only four known constants: the number of the extra spatial dimensions in the superstring, the mass of electron, the mass of Z=B0, and the fine structure constant for the magnetic field. The calculated masses are in good agreement with the observed values. For examples, the calculated masses for the top quark, neutron, and pion are 176.5 GeV, 939.54MeV, and 135.01MeV in excellent agreement with the observed masses, 176 =B1 13 GeV, 939.57 MeV, and 134.98 MeV, respectively. The masses of 110 hadrons are calculated. The overall average difference between the calculated masses and the observed masses for all hadrons is 0.29 MeV. The periodic table of elementary particles provides the most comprehensive explanation and calculation for the masses of elementary particles and hadrons.