A phase difference detector comprising: a multipolar magnet that rotates in accordance with rotation of a rotary body, and that has a plurality of magnetic poles; two magnetic sensors that are a first magnetic sensor and a second magnetic sensor, and that respectively output sinusoidal signals having a predetermined phase difference in accordance with rotation of the multipolar magnet; and a phase difference computation unit that computes the phase difference with use of the output signals from the two magnetic sensors, wherein where an output signal S 1 from the first magnetic sensor is expressed by S 1 = A 1 sin(E 1 θ) in which A 1 is an amplitude of the output signal S 1, E 1 is a magnetic pole width error correction value for the magnetic pole sensed by the first magnetic sensor, and θ is a rotation angle of the rotary body, an output signal S 2 from the second magnetic sensor is expressed by S 2 = A 2 sin(E 2 θ + C) in which A 2 is an amplitude of the output signal S 2, E 2 is a magnetic pole width error correction value for the magnetic pole sensed by the second magnetic sensor, and C is a phase difference between the output signal S 2 from the second magnetic sensor and the output signal S 1 from the first magnetic sensor, m is the number of the magnetic poles of the multipolar magnet, i is a natural number from 1 to m, which is used to relatively identify each of the magnetic poles, and E(i) is a magnetic pole width error correction value corresponding to each of the magnetic poles, the phase difference computation unit includes a first computation unit that executes a process of computing a value of E(i) · C corresponding to one and the same given magnetic pole sensed by the two magnetic sensors with use of six output signals that are sampled at three different timings while the two magnetic sensors are sensing the given magnetic pole when the rotary body is rotating, until values of E(i) · C corresponding to all the magnetic poles are computed, and a second computation unit that computes the phase difference C with use of the values of E(i) · C corresponding to all the magnetic poles computed by the first computation unit and the number m of the magnetic poles of the multipolar magnet. a multipolar magnet that rotates in accordance with rotation of a rotary body, and that has a plurality of magnetic poles; two magnetic sensors that are a first magnetic sensor and a second magnetic sensor, and that respectively output sinusoidal signals having a predetermined phase difference in accordance with rotation of the multipolar magnet; and a phase difference computation unit that computes the phase difference with use of the output signals from the two magnetic sensors, wherein where an output signal S 1 from the first magnetic sensor is expressed by S 1 = A 1 sin(E 1 θ) in which A 1 is an amplitude of the output signal S 1, E 1 is a magnetic pole width error correction value for the magnetic pole sensed by the first magnetic sensor, and θ is a rotation angle of the rotary body, an output signal S 2 from the second magnetic sensor is expressed by S 2 = A 2 sin(E 2 θ + C) in which A 2 is an amplitude of the output signal S 2, E 2 is a magnetic pole width error correction value for the magnetic pole sensed by the second magnetic sensor, and C is a phase difference between the output signal S 2 from the second magnetic sensor and the output signal S 1 from the first magnetic sensor, m is the number of the magnetic poles of the multipolar magnet, i is a natural number from 1 to m, which is used to relatively identify each of the magnetic poles, and E(i) is a magnetic pole width error correction value corresponding to each of the magnetic poles, the phase difference computation unit includes a first computation unit that executes a process of computing a value of E(i) · C corresponding to one and the same given magnetic pole sensed by the two magnetic sensors with use of six output signals that are sampled at three different timings while the two magnetic sensors are sensing the given magnetic pole when the rotary body is rotating, until values of E(i) · C corresponding to all the magnetic poles are computed, and a second computation unit that computes the phase difference C with use of the values of E(i) · C corresponding to all the magnetic poles computed by the first computation unit and the number m of the magnetic poles of the multipolar magnet.