A model explaining the variability of oxygen solubility in the transition metals is proposed in this article. It assumes that the energy of solution can be represented as the sum of the work required to embed an oxygen atom in the electron gas of the host lattice, plus the energy generated through the formation of an oxygen anion. The latter term is treated as nearly constant across the transition metal series, leaving the work term to account for the observed variations in oxygen solubility. This work, we argue, can be approximated by the ratio of the number of metal electrons excluded from the region around the oxygen atom to the Fermi energy density of states. In turn, the number of electrons excluded by oxygen is assumed to be proportional to the charge density at the octahedral interstitial site. These assumptions allow us to define a solubility parameter that is easily determined with first-principles methods. This parameter is shown to correlate well with experimental findings regarding oxygen solubility in transition metals. Supported by these findings, we use first principle methods to identify alloying elements likely to reduce the solubility of oxygen in niobium.