A detection device, comprising: a housing including a mounting hole provided inside with a set of yokes that transmit the magnetic flux generated according to a magnitude of a physical quantity to be detected; and a magnetic detection module 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 housed in a case , wherein the set of yokes has ring portions 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 having a large shaft portion inserted into the large hole and a small shaft portion inserted into the small hole , 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 that transmit the magnetic flux generated according to a magnitude of a physical quantity to be detected; and a magnetic detection module 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 housed in a case , wherein the set of yokes has ring portions 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 having a large shaft portion inserted into the large hole and a small shaft portion inserted into the small hole , 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. <EOS>