To improve the manufacturing yield of a semiconductor device having a three-dimensional structure wherein a plurality of chips are stacked and bonded, an opening shape of a conductive groove (4A) formed in each chip (C2) obtained from a wafer (W2) is permitted to be rectangular and the number of conductive grooves (4A) having a long side in a Y direction and the number of conductive grooves (4A) in an X direction orthogonally intersecting the Y direction is permitted to be substantially the same in the wafer (W2) as a whole. Thus, a film stress when the conductive film is embedded in the conductive groove (4A) is reduced, and peeling of the conductive film and generation of microcracks or warpage and breakage of the wafer (W2) are prevented.