Aims. In the context of the core instability model, we present calculations of in situ giant planet formation. The oligarchic growth regime of solid protoplanets is the model adopted for the growth of the core. This growth regime for the core has not been considered before in full evolutionary calculations of this kind. Methods. The full differential equations of giant planet formation were numerically solved with an adaptation of a Henyey-type code. The planetesimals accretion rate was coupled in a self-consistent way to the envelope’s evolution. Results. We performed several simulations for the formation of a Jupiter-like object by assuming various surface densities for the protoplanetary disc and two different sizes for the accreted plan...