A position detecting device includes: a magnet that has a first magnetic pole and a second magnetic pole; a magnetic sensor that detects a change in magnetic flux generated by a detection target which enters between the magnet and the magnetic sensor on the first magnetic pole side of the magnet; and a magnetic shield that has a magnetic gap between the magnet and the magnetic shield, and that includes a magnetic material which is disposed on the second magnetic pole side of the magnet.