The timescales for planet formation can vary widely. The initial stages of dust coagulation can occur within a few thousand years. The formation of planetesimals and protoplanets can take a few million years. Gas giant planets need to form within the first 10 million years while the gas in the protoplanetary disk is still available.