The long term thermal and dynamic evolution of Earth's core depends on its energy budget, and models have shown that radioactive decay due to K and U disintegration can contribute significantly to core dynamics and thermal evolution if substantial amounts of heat-producing elements are dissolved in the core during differentiation. Here we performed laser-heated diamond anvil cell experiments and measured K and U solubility in molten iron alloy at core formation conditions. Pyrolitic and basaltic silicate melts were equilibrated with metallic S-Si-O-bearing iron alloys at pressures of 49 to 81 GPa and temperatures of 3500 to 4100 K. We found that the metal-silicate partitioning of K is independent of silicate or metal composition and increases with pressure. Conversely, U partitioning is independent of pressure and silicate composition but it strongly increases with temperature and oxygen concentration in the metal. We subsequently modelled U and K concentration in the core during core formation, and found a maximum of 26 ppm K and 3.5 ppb U dissolved in the core, producing up to 7.5 TW of heat 4.5 Gyr ago. While higher than previous estimates, this is insufficient to power an early geodynamo, appreciably reduce initial core temperature, or significantly alter its thermal evolution and the (apparently young) age of the inner core.