To provide a semiconductor device composed of a semiconductor element or a group of semiconductor elements, in which a crystalline semiconductor film having as few grain boundaries as possible in a channel formation region is formed on an insulating surface, which can operate at high speed, which have high current drive performance, and which are less fluctuated between elements. The method of the present invention includes: forming an insulating film with an opening on a substrate having an insulating surface; forming on the insulating film and over the opening an amorphous semiconductor film or a polycrystalline semiconductor film that has randomly-formed grain boundaries; forming a crystalline semiconductor film by melting the semiconductor film, pouring the melted semiconductor into the opening of the insulating film, and crystallizing or re-crystallizing the semiconductor film; and removing the crystalline semiconductor film except a portion of the crystalline semiconductor film that is in the opening to form a gate insulating film, which is in contact with the top face of the crystalline semiconductor film, and a gate electrode.