The relevant quantity in the comparison of the absolute positron energy levels in different materials is the sum of the internal electron and positron chemical potentials, i.e. the sum of the Fermi level and the bottom of the lowest positron band relative to a common, well-defined reference energy. This sum is defined as the positron affinity. The positron affinity reflects the preference of the positron for different components in heterostructures made of different materials and the preference between the host matrix and precipitates in alloys. Moreover, the affinity is closely related to the positron work function and positronium formation potential which are important parameters in the slow-positron-beam experiments. The authors have determined the positron affinity for the alkaline and alkaline-earth metals, 3d-, 4d-, and 5d-transition metal series, and for some metals on the right in the Periodic Table. The diamond structure semiconductors are also considered. The determination is based on the self-consistent electron structure calculations and the subsequent calculation of the positron band structure within the local-density approximation. The trends are studied and interpreted along the different columns and rows of the Periodic Table. The results are also compared with available experiments.