A semiconductor device, comprising: a semiconductor substrate of a first conductivity type; and a vertical Hall element formed on the semiconductor substrate, the vertical Hall element comprising: a semiconductor layer of a second conductivity type formed on the semiconductor substrate; a plurality of electrodes aligned (31, 33, 35, 42, 44) along a straight line in a surface of the semiconductor layer, each of the plurality of electrodes comprising an impurity region of the second conductivity type that has a concentration that is higher than the concentration of the semiconductor layer; and a plurality of electrode isolation diffusion layers of the first conductivity type isolating the plurality of electrodes from one another, each of the plurality of electrode isolation diffusion layers being provided between each pair of the plurality of electrodes in the surface of the semiconductor layer, the plurality of electrodes comprising a drive current supply electrode (31, 33, 35) and a Hall voltage output electrode (42, 44), the drive current supply electrode and the Hall voltage output electrode being arranged alternately, the Hall voltage output electrode having a first depth, and characterized in that the drive current supply electrode having a second depth that is larger than the first depth and a depth of the plurality of electrode isolation diffusion layers. a semiconductor substrate of a first conductivity type; and a vertical Hall element formed on the semiconductor substrate, the vertical Hall element comprising: a semiconductor layer of a second conductivity type formed on the semiconductor substrate; a plurality of electrodes aligned (31, 33, 35, 42, 44) along a straight line in a surface of the semiconductor layer, each of the plurality of electrodes comprising an impurity region of the second conductivity type that has a concentration that is higher than the concentration of the semiconductor layer; and a plurality of electrode isolation diffusion layers of the first conductivity type isolating the plurality of electrodes from one another, each of the plurality of electrode isolation diffusion layers being provided between each pair of the plurality of electrodes in the surface of the semiconductor layer, a semiconductor layer of a second conductivity type formed on the semiconductor substrate; a plurality of electrodes aligned (31, 33, 35, 42, 44) along a straight line in a surface of the semiconductor layer, each of the plurality of electrodes comprising an impurity region of the second conductivity type that has a concentration that is higher than the concentration of the semiconductor layer; and a plurality of electrode isolation diffusion layers of the first conductivity type isolating the plurality of electrodes from one another, each of the plurality of electrode isolation diffusion layers being provided between each pair of the plurality of electrodes in the surface of the semiconductor layer, the plurality of electrodes comprising a drive current supply electrode (31, 33, 35) and a Hall voltage output electrode (42, 44), the drive current supply electrode and the Hall voltage output electrode being arranged alternately, the Hall voltage output electrode having a first depth, and characterized in that the drive current supply electrode having a second depth that is larger than the first depth and a depth of the plurality of electrode isolation diffusion layers.