Sub-Saturns straddle the boundary between gas-rich Jupiters and gas-poor super-Earths/sub-Neptunes . Their large radii ( 4–8 R _ { \oplus } ) suggest that their gas-to-core mass ratios range \sim 0.1–1.0 . With their envelopes being as massive as their cores , sub-Saturns are just on the verge of runaway gas accretion ; they are expected to be significantly less populous than gas giants . Yet , the observed occurrence rates of sub-Saturns and Jupiters are comparable within \sim 100 days . We show that in these inner regions of planetary systems , the growth of sub-Saturns/Jupiters is ultimately limited by local and global hydrodynamic flows—runaway accretion terminates and the formation of gas giants is suppressed . We derive a simple analytic formula for the local hydrodynamic accretion rate—an expression that has been previously reported only as an empirical fit to numerical simulations . Evolving simultaneously the background disk gas and the gas accretion onto planetary cores , we find that both the ubiquity of super-Earths/sub-Neptunes and the rarity of gas-rich planets are best explained if an underlying core-mass distribution is peaked at \sim 4.3 M _ { \oplus } . Within a finite disk lifetime \sim 10 Myrs , massive cores ( \gtrsim 10 M _ { \oplus } ) can become either gas-poor or gas-rich depending on when they assemble , but smaller cores ( \lesssim 10 M _ { \oplus } ) can only become gas-poor . This wider range of possible outcomes afforded by more massive cores may explain why metal-rich stars harbor a more diverse set of planets .