A semiconductor device comprising a first element region in which an insulated gate bipolar transistor is provided and a second element region in which a diode is provided on a semiconductor substrate that forms a first conductivity type drift region, the semiconductor device further comprising: a plurality of trenches provided in stripe form extending in a longitudinal direction perpendicular to the direction in which the first element region and second element region are aligned from the first element region across the second element region in the front surface of the semiconductor substrate; a gate insulating film provided along the side walls and bottom surface of the trench; a gate electrode provided on the inner side of the gate insulating film inside the trench; a second conductivity type base region selectively provided in a mesa portion between neighboring trenches of the first element region; a second conductivity type anode region selectively provided in a mesa portion between neighboring trenches of the second element region; a first conductivity type emitter region selectively provided inside the base region; a first electrode in contact with the base region, emitter region, and anode region; a second conductivity type collector region provided on the back surface of the semiconductor substrate in the first element region; a first conductivity type cathode region provided on the back surface of the semiconductor substrate in the second element region; and a second electrode in contact with the collector region and cathode region, wherein the anode region and drift region are repeatedly, alternately disposed in the trench longitudinal direction in a mesa portion between neighboring trenches of the second element region; characterized in that the first electrode is not in contact with the drift region; and the proportion occupied by the anode region of a unit region formed of the anode region and the drift region in a portion sandwiched by the anode region and the anode region neighboring the anode region in the trench longitudinal direction is 50% or more and less than 100%. a plurality of trenches provided in stripe form extending in a longitudinal direction perpendicular to the direction in which the first element region and second element region are aligned from the first element region across the second element region in the front surface of the semiconductor substrate; a gate insulating film provided along the side walls and bottom surface of the trench; a gate electrode provided on the inner side of the gate insulating film inside the trench; a second conductivity type base region selectively provided in a mesa portion between neighboring trenches of the first element region; a second conductivity type anode region selectively provided in a mesa portion between neighboring trenches of the second element region; a first conductivity type emitter region selectively provided inside the base region; a first electrode in contact with the base region, emitter region, and anode region; a second conductivity type collector region provided on the back surface of the semiconductor substrate in the first element region; a first conductivity type cathode region provided on the back surface of the semiconductor substrate in the second element region; and a second electrode in contact with the collector region and cathode region, wherein the anode region and drift region are repeatedly, alternately disposed in the trench longitudinal direction in a mesa portion between neighboring trenches of the second element region; characterized in that the first electrode is not in contact with the drift region; and the proportion occupied by the anode region of a unit region formed of the anode region and the drift region in a portion sandwiched by the anode region and the anode region neighboring the anode region in the trench longitudinal direction is 50% or more and less than 100%.