Method for operating a metal detector that comprises a balanced coil system with a transmitter coil that is connected to a transmitter unit, which provides a transmitter signal with at least one fixed or selectable transmitter frequency (f TX) or a waveform comprising at least two different transmitter frequencies (f TX), and with a first and a second receiver coil (22, 23) that provide output signals to a receiver unit, which comprises a first phase detector and a second phase detector, in which the output signals are compared with related reference signals (s RI; s RQ) that correspond to the at least one transmitter frequency (f TX) and are offset to each other in phase in order to produce in-phase components (s 3I) and quadrature components (s 3Q) of the output signals, which are forwarded to a signal processing unit that suppresses signal components originating from goods or noise and that further processes signal components originating from metal contaminants, characterized in that the method comprising the following steps: a) providing at least one test loop with a test coil that is inductively coupled with the coil system and with a controllable switch, with which the test loop is opened or closed depending on a first control signal applied to the controllable switch; b) applying the first control signal for closing the controllable switch during a first test interval or applying the first control signal for recursively closing and opening the controllable switch according to a test frequency during the first test interval, measuring a test signal (s Tφ) and determining the phase angle (φ) of the test signal (s Tφ); c) applying the first control signal for closing the controllable switch during a second test interval or applying the first control signal for recursively closing and opening the controllable switch according to a test frequency during the second test interval, measuring the test signal (s Tφ') and determining the phase angle (φ'; φ + δφ) of the test signal (S Tφ'); d) comparing the phase angle (φ) of the test signal (s Tφ) measured in the first test interval with the phase angle (φ'; φ + δφ) of the test signal (s Tφ') measured in the second test interval and determining the related angular difference (δφ), and e) correcting the determined angular difference (δφ). a) providing at least one test loop with a test coil that is inductively coupled with the coil system and with a controllable switch, with which the test loop is opened or closed depending on a first control signal applied to the controllable switch; b) applying the first control signal for closing the controllable switch during a first test interval or applying the first control signal for recursively closing and opening the controllable switch according to a test frequency during the first test interval, measuring a test signal (s Tφ) and determining the phase angle (φ) of the test signal (s Tφ); c) applying the first control signal for closing the controllable switch during a second test interval or applying the first control signal for recursively closing and opening the controllable switch according to a test frequency during the second test interval, measuring the test signal (s Tφ') and determining the phase angle (φ'; φ + δφ) of the test signal (S Tφ'); d) comparing the phase angle (φ) of the test signal (s Tφ) measured in the first test interval with the phase angle (φ'; φ + δφ) of the test signal (s Tφ') measured in the second test interval and determining the related angular difference (δφ), and e) correcting the determined angular difference (δφ).