The planetary mass-radius diagram is an observational result of central importance to understand planet formation. We present an updated version of our planet formation model based on the core accretion paradigm which allows us to calculate planetary radii and luminosities during the entire formation and evolution of the planets. We ﬁrst study with it the formation of Jupiter, and compare with previous works. Then we conduct planetary population synthesis calculations to obtain a synthetic mass-radius diagram which we compare with the observed one. Except for bloated Hot Jupiters which can be explained only with additional mechanisms related to their proximity to the star, we ﬁnd a good agreement of the general shape of the observed and the synthetic M − R diagram. This shape can be understood with basic concepts of the core accretion model.