Earth’s core is less dense than iron, and therefore it must contain “light elements,” such as S, Si, O, or C. We use ab initio molecular dynamics to calculate the density and bulk sound velocity in liquid metal alloys at the pressure and temperature conditions of Earth’s outer core. We compare the velocity and density for any composition in the (Fe–Ni, C, O, Si, S) system to radial seismological models and find a range of compositional models that fit the seismological data.