The strength of interaction between a metal and oxygen and/or carbon is a crucial factor for catalytic performance, materials stability, and other important applications. While these are fundamental properties in materials science, there is no general understanding of what makes a metal oxophilic or carbophilic, especially for main group metals. In this work, we elucidate the factors that control how oxophilic or carbophilic a metal is by creating a predictive model and applying it to a variety of data sets for transition metals and main group metals, including DFT-calculated adsorption energies and experimental formation energies. Our model is easily interpretable and accurately describes oxophilic and carbophilic trends across different regions of the periodic table. This model captures the ionic contribution to bonding, the adsorbate-sp contribution to bonding, and the adsorbate-d contribution to bonding by using the reduction potential, matrix coupling elements, band centers, and band filling. For transition metals, the adsorbate-surface d coupling is the major factor that determines oxophilicity relative to carbophilicity. For metals that do not contain d electrons either in their core or valence shell (Li, Be, Na, Mg, Al, K, and Ca), the reduction potential and the adsorbate-surface s coupling are the major factors. As a simple application, we demonstrate the utility of oxophilicity and carbophilicity in rapidly screening metal dopants for improved selectivity for ethylene epoxidation on silver-based catalysts. Using our model, we established a direct relationship between the electronic properties of the metal dopants and their selectivity for ethylene epoxidation. The results suggest that transition metals with high adsorbate-surface d coupling and main group metals with low adsorbate-surface s coupling are good silver-dopant candidates for this reaction. Overall, the improved linkage between a metal’s electronic structure and its interaction with carbon or oxygen will be broadly useful in design of functional materials for a variety of applications.