Accretion from many small planetesimals to planets is reviewed. Solid protoplanets accrete through runaway and oligarchic growth until they become isolated. The isolation mass of protoplanets in terrestrial planet region is about 0.1-0.2 Earth mass, which suggests giant impacts among the protoplanets in the final stage of terrestrial planet formation. On the other hand, the isolation mass in Jupiter's and Saturn's orbits is about a few to 5 Earth masses, which may be massive enough to trigger gas accretion onto the cores. The isolation mass in Uranus and Neptune's orbits is as large as their present cores. Extending the above arguments to extrasolar planetary systems that are formed from disks with various initial masses, we also discuss diversity of extrasolar planetary systems.