AbstractThe radius valley (or gap) in the observed distribution of exoplanet radii, which separates smaller super-Earths from larger sub-Neptunes, is a key feature that theoretical models must explain. Conventionally, it is interpreted as the result of the loss of primordial hydrogen and helium (H/He) envelopes atop rocky cores. However, planet formation models predict that water-rich planets migrate from cold regions outside the snowline towards the star. Assuming water to be in the form of solid ice in their interior, many of these planets would be located in the radius gap contradicting observations. Here we use an advanced coupled formation and evolution model that describes the planets’ growth and evolution starting from solid, moon-sized bodies in the protoplanetary disk to mature Gyr-old planetary systems. Employing new equations of state and interior structure models to treat water as vapour mixed with H/He, we naturally reproduce the valley at the observed location. The model results demonstrate that the observed radius valley can be interpreted as the separation of less massive, rocky super-Earths formed in situ from more massive, ex situ, water-rich sub-Neptunes. Furthermore, the occurrence drop at larger radii, the so-called radius cliff, is matched by planets with water-dominated envelopes. Our statistical approach shows that the synthetic distribution of radii quantitatively agrees with observations for close-in planets, but only if low-mass planets initially containing H/He lose their atmosphere due to photoevaporation, which populates the super-Earth peak with evaporated rocky cores. Therefore, we provide a hybrid theoretical explanation of the radius gap and cliff caused by both planet formation (orbital migration) as well as evolution (atmospheric escape).