A semiconductor device (101, 102, 103), comprising: - an insulating semiconductor substrate; - a first conductivity-type first drift region (4, 41) disposed on a principal surface of the substrate; - a second conductivity-type first well region (i) that has a bottom portion, (ii) that extends from a second principal surface of the first conductivity-type first drift region (4, 41) in a direction perpendicular to the second principal surface through the first conductivity-type first drift region (4, 41) into the substrate, the second principal surface of the first conductivity-type first drift region (4, 41) being located on a side of the first conductivity-type first drift region (4, 41) opposite to a first principal surface of the first conductivity-type first drift region (4, 41) in contact with the principal surface of the substrate - a second conductivity-type second well region being in contact with the bottom portion and disposed at a portion inside the substrate located below the bottom portion; - a first conductivity-type source region extending in the perpendicular direction from a region of the second principal surface provided with the first well region, and reaching the second well region; - a first conductivity-type drain region extending in the perpendicular direction from the second principal surface in the first conductivity-type first drift region (4, 41) and away from the first well region and the second well region; - a gate insulating film in contact with at least a side surface of a gate groove including the side surface exposed to the first well region, the second well region, the source region, and the first conductivity-type first drift region (4, 41); - a gate electrode disposed inside the gate groove through the gate insulating film; - a source electrode electrically coupled to the source region and the first well region; and - a drain electrode electrically coupled to the drain region, wherein in a direction parallel to the second principal surface and oriented from the source electrode to the drain electrode, a distance of the second well region in contact with the gate insulating film is shorter than a distance of the first well region in contact with the gate insulating film. - an insulating semiconductor substrate; - a first conductivity-type first drift region (4, 41) disposed on a principal surface of the substrate; - a second conductivity-type first well region (i) that has a bottom portion, (ii) that extends from a second principal surface of the first conductivity-type first drift region (4, 41) in a direction perpendicular to the second principal surface through the first conductivity-type first drift region (4, 41) into the substrate, the second principal surface of the first conductivity-type first drift region (4, 41) being located on a side of the first conductivity-type first drift region (4, 41) opposite to a first principal surface of the first conductivity-type first drift region (4, 41) in contact with the principal surface of the substrate - a second conductivity-type second well region being in contact with the bottom portion and disposed at a portion inside the substrate located below the bottom portion; - a first conductivity-type source region extending in the perpendicular direction from a region of the second principal surface provided with the first well region, and reaching the second well region; - a first conductivity-type drain region extending in the perpendicular direction from the second principal surface in the first conductivity-type first drift region (4, 41) and away from the first well region and the second well region; - a gate insulating film in contact with at least a side surface of a gate groove including the side surface exposed to the first well region, the second well region, the source region, and the first conductivity-type first drift region (4, 41); - a gate electrode disposed inside the gate groove through the gate insulating film; - a source electrode electrically coupled to the source region and the first well region; and - a drain electrode electrically coupled to the drain region,