A detection device, comprising: a housing including a mounting hole provided inside with a set of yokes (31, 32) that transmit the magnetic flux generated according to a magnitude of a physical quantity to be detected; and a magnetic detection module (903, 904) mounted in the mounting hole in the housing and configured to detect the magnetic flux transmitted from the yoke by one or more magnetic sensors (71, 72) housed in a case (501, 504), wherein the set of yokes has ring portions (35, 36) that face each other and form a magnetic circuit, the mounting hole of the housing has a large hole formed on an opening side and a small hole formed in a back of the large hole, the magnetic detection module faces an inner wall of the mounting hole and includes a cylindrical portion (813, 814) having a large shaft portion inserted into the large hole and a small shaft portion inserted into the small hole (813, 814), and a sensor unit in which the magnetic sensor is housed and protrudes from the tip end surface of the cylindrical portion and is inserted between the ring portions of the set of yokes via a gap, in a direction orthogonal to an axial direction of the mounting hole and the cylinder portion, when a minimum distance between the sensor unit and the ring portion is defined as a sensor margin (μ), at least one of the one-sided fitting gap (ε1) between the large hole and the large shaft portion or the one-sided fitting gap (ε2) between the small hole and the small shaft portion is set to be smaller than the sensor margin, and the one-sided fitting gap (ε2) between the small hole and the small shaft portion is larger than the one-sided fitting gap (ε1) between the large hole and the large shaft portion. a housing including a mounting hole provided inside with a set of yokes (31, 32) that transmit the magnetic flux generated according to a magnitude of a physical quantity to be detected; and a magnetic detection module (903, 904) mounted in the mounting hole in the housing and configured to detect the magnetic flux transmitted from the yoke by one or more magnetic sensors (71, 72) housed in a case (501, 504), wherein the set of yokes has ring portions (35, 36) that face each other and form a magnetic circuit, the mounting hole of the housing has a large hole formed on an opening side and a small hole formed in a back of the large hole, the magnetic detection module faces an inner wall of the mounting hole and includes a cylindrical portion (813, 814) having a large shaft portion inserted into the large hole and a small shaft portion inserted into the small hole (813, 814), and a sensor unit in which the magnetic sensor is housed and protrudes from the tip end surface of the cylindrical portion and is inserted between the ring portions of the set of yokes via a gap, in a direction orthogonal to an axial direction of the mounting hole and the cylinder portion, when a minimum distance between the sensor unit and the ring portion is defined as a sensor margin (μ), at least one of the one-sided fitting gap (ε1) between the large hole and the large shaft portion or the one-sided fitting gap (ε2) between the small hole and the small shaft portion is set to be smaller than the sensor margin, and the one-sided fitting gap (ε2) between the small hole and the small shaft portion is larger than the one-sided fitting gap (ε1) between the large hole and the large shaft portion.