We investigate the effects of metal dopants on BiFeO3 (BFO) by first-principles calculations. Substitutional doping in oxide materials is often complicated by the formation of defects that interfere with, dominate, or otherwise change the effects of the introduced dopant. As a result, extracting correct conclusions and working principles experimentally requires extensive characterization of the material properties, which is not easily accessible. We solve this problem by an extensive model study of the changes that are introduced in the crystal, electronic, and magnetic structure of BFO, focusing on substitutional doping in an otherwise ideal crystal. We examine a large number of candidate elements. From our results, trends can be established within rows and groups of the periodic table. We predict the preferred doping site (Bi or Fe substitution) and oxidation state for each dopant and provide an in-depth understanding of the structural and electronic changes that are introduced upon doping. From this, we are able to divide the periodic table into direct p-dopants, n-dopants, and isovalent cases. For the latter, understanding the valence configuration and the band structure of the doped systems enables to distinguish between isovalent dopants that can enable p-type, n-type, or no doping. A comparison of the resulting acceptor and donor states provides insight into the performance of such dopants and, together with defect formation energies, enables ranking all candidates and identification of optimal dopants. K Ca +2 [8-11] Sc +3 [12, 13] Ti +4 [14-17] V +5 [17, 18] Cr +3 [19-22] +2-4Mn [22][23][24][25][26][27][28][29] Fe +3 Co +3 [30,31] Ni +3 [32,33] +2-3Cu [17,32] Zn +2 [16,17] Ga +3 [34,35] Ge Rb Sr +2 [9,10] Y +3 [36,37]