A position detecting device, comprising: a scale having magnetic signals with a constant period magnetically recorded on a magnetic medium; a plurality of magnetism detecting elements configured to detect the magnetic signals from the scale and output signals corresponding to the detected magnetic signals; and a position detecting section configured to detect a position relative to the scale based on the signals output by the magnetism detecting elements, wherein the plurality of magnetism detecting elements are arranged, along a detection direction of the magnetic signals relative to the scale, in a pattern with a pitch distance L for cancelling at least third, fifth, and seventh order harmonics of the signals output by the magnetism detecting elements, in which m-th power of 2 magnetism detecting elements are arranged within a range in which a pitch distance L between a first magnetism detecting element and a last magnetism detecting element in the range in the detection direction satisfies a following conditional formula; L=(λ'/2)×(1/3+1/5+1/7+... 1/(2m+1)), wherein m is an integer of three or more, and respective magnetism detecting elements for cancelling third, fifth, and seventh order harmonics of the signals output by the magnetism detecting elements are arranged at respective intervals of 1/2n of a wavelength λ' of the signals output by the magnetism detecting elements from the first magnetism detecting element, wherein n is a prime number of three or more, and wherein the pattern repeats itself with a pitch p, so that at least third, fifth, and seventh order harmonic signals of the signals corresponding to the magnetic signals are reduced. a scale having magnetic signals with a constant period magnetically recorded on a magnetic medium; a plurality of magnetism detecting elements configured to detect the magnetic signals from the scale and output signals corresponding to the detected magnetic signals; and a position detecting section configured to detect a position relative to the scale based on the signals output by the magnetism detecting elements, wherein the plurality of magnetism detecting elements are arranged, along a detection direction of the magnetic signals relative to the scale, in a pattern with a pitch distance L for cancelling at least third, fifth, and seventh order harmonics of the signals output by the magnetism detecting elements, in which m-th power of 2 magnetism detecting elements are arranged within a range in which a pitch distance L between a first magnetism detecting element and a last magnetism detecting element in the range in the detection direction satisfies a following conditional formula; L=(λ'/2)×(1/3+1/5+1/7+... 1/(2m+1)), wherein m is an integer of three or more, and respective magnetism detecting elements for cancelling third, fifth, and seventh order harmonics of the signals output by the magnetism detecting elements are arranged at respective intervals of 1/2n of a wavelength λ' of the signals output by the magnetism detecting elements from the first magnetism detecting element, wherein n is a prime number of three or more, and wherein the pattern repeats itself with a pitch p, so that at least third, fifth, and seventh order harmonic signals of the signals corresponding to the magnetic signals are reduced.