A semiconductor device (100, 150, 200, 300) comprising: a semiconductor substrate having a first conductivity-type drift region; a transistor portion provided in the semiconductor substrate; and a diode portion provided in the semiconductor substrate, wherein the transistor portion and the diode portion each have: a second conductivity-type base region provided in the semiconductor substrate and above the drift region; a plurality of trench portions (30, 40) that are provided penetrating the base region from an upper surface of the semiconductor substrate and have conductive portions provided therein; and a mesa portion sandwiched by trench portions (30, 40), the transistor portion has one or more first conductivity-type accumulation regions that are provided in each of the mesa portions and between the base region and the drift region and have doping concentrations higher than that of the drift region, the diode portion has one or more first conductivity-type high concentration regions that are provided in each of the mesa portions and between the base region and the drift region and have doping concentrations higher than that of the drift region, and an integrated concentration obtained by integrating the doping concentrations of the one or more accumulation regions in at least some of the mesa portions of the transistor portion in a depth direction of the semiconductor substrate is higher than an integrated concentration obtained by integrating the doping concentrations of the one or more high concentration regions of the mesa portion of the diode portion in the depth direction of the semiconductor substrate, characterized in that in at least one of the mesa portions of the transistor portion, the number of the accumulation regions formed in a depth direction is greater than the number of the high concentration regions formed in a depth direction in the mesa portion of the diode portion. a semiconductor substrate having a first conductivity-type drift region; a transistor portion provided in the semiconductor substrate; and a diode portion provided in the semiconductor substrate, wherein the transistor portion and the diode portion each have: a second conductivity-type base region provided in the semiconductor substrate and above the drift region; a plurality of trench portions (30, 40) that are provided penetrating the base region from an upper surface of the semiconductor substrate and have conductive portions provided therein; and a mesa portion sandwiched by trench portions (30, 40), a second conductivity-type base region provided in the semiconductor substrate and above the drift region; a plurality of trench portions (30, 40) that are provided penetrating the base region from an upper surface of the semiconductor substrate and have conductive portions provided therein; and a mesa portion sandwiched by trench portions (30, 40), the transistor portion has one or more first conductivity-type accumulation regions that are provided in each of the mesa portions and between the base region and the drift region and have doping concentrations higher than that of the drift region, the diode portion has one or more first conductivity-type high concentration regions that are provided in each of the mesa portions and between the base region and the drift region and have doping concentrations higher than that of the drift region, and an integrated concentration obtained by integrating the doping concentrations of the one or more accumulation regions in at least some of the mesa portions of the transistor portion in a depth direction of the semiconductor substrate is higher than an integrated concentration obtained by integrating the doping concentrations of the one or more high concentration regions of the mesa portion of the diode portion in the depth direction of the semiconductor substrate, characterized in that in at least one of the mesa portions of the transistor portion, the number of the accumulation regions formed in a depth direction is greater than the number of the high concentration regions formed in a depth direction in the mesa portion of the diode portion.