An object of the present invention is such that when an error value in an optimization convergence calculation for calculating position and direction information of a detection target diverges, a state of the error value in the optimization convergence calculation can be returned to a converged state in a short period of time. A position detecting device (10) according to the present invention includes a magnetic field detector (11) that detects a magnetic field generated by a magnetic field generator (2b) in a capsule endoscope (2) a position calculator (13) that calculates position and direction information of the capsule endoscope (2) by performing an optimization convergence calculation using an evaluation value expressing an error between a measurement value and a theoretical value of magnetic field information detected by the magnetic field detector (11), a storage unit (15) that stores convergence result information (15a) including a final convergence result of the optimization convergence calculation, and a controller (16) that controls these components. The controller (16) determines whether a result of the optimization convergence calculation converges. When the result of the optimization convergence calculation does not converge, the controller (16) suspends an operation of the position calculator (13), and after a predetermined time has passed, causes the position calculator (13) to start the optimization convergence calculation using the final convergence result.