Method for detecting a phase shift in an output signal of an inductive position sensor, wherein the inductive position sensor provides a first position signal and a second phase-shifted position signal, particularly a sine position signal and a cosine position signal, the method comprising the steps of: sampling the first position signal and the second position signal over one period of the inductive position sensor with a sampling frequency if the first position signal and the second position signal are analog; calculating the Fast Fourier Transform of the first position signal and the second position signal over one period of the inductive position sensor, which results in a first position vector and a second position vector, the first position vector and the second position vector each comprising real components and imaginary components for each sample of the respective position signal; calculating the phase spectrum of the first position signal and the phase spectrum of the second position signal over one period of the inductive position sensor from the first position vector and the second position vector by determining the arctan function of the imaginary part divided by the real part for each member of the first position vector and the second position vector; repeating the steps of sampling the first position signal and the second position signal over one period of the inductive position sensor, calculating the Fast Fourier Transform of the first position signal and the second position signal over one period of the inductive position sensor and calculating the phase spectrum of the first position signal and the phase spectrum of the second position signal over one period of the inductive position sensor from the first position vector and the second position vector for further periods of the first position signal and the second position signal of the inductive position sensor, comparing the calculated phase spectrum of the first position signal and the phase spectrum of the second position signal of different periods of the first position signal and the second position signal of the inductive position sensor to detect a change in the phase spectrum of the first position signal and/or in the phase spectrum of the second position signal, wherein the initially calculated phase spectrum of the first position signal and the initially calculated phase spectrum of the second position signal are stored as first initial phase spectrum and second initial phase spectrum and all afterwards calculated phase spectrums for the first position signal and the second position signal are compared to the first initial phase spectrum respectively second initial phase spectrum. sampling the first position signal and the second position signal over one period of the inductive position sensor with a sampling frequency if the first position signal and the second position signal are analog; calculating the Fast Fourier Transform of the first position signal and the second position signal over one period of the inductive position sensor, which results in a first position vector and a second position vector, the first position vector and the second position vector each comprising real components and imaginary components for each sample of the respective position signal; calculating the phase spectrum of the first position signal and the phase spectrum of the second position signal over one period of the inductive position sensor from the first position vector and the second position vector by determining the arctan function of the imaginary part divided by the real part for each member of the first position vector and the second position vector; repeating the steps of sampling the first position signal and the second position signal over one period of the inductive position sensor, calculating the Fast Fourier Transform of the first position signal and the second position signal over one period of the inductive position sensor and calculating the phase spectrum of the first position signal and the phase spectrum of the second position signal over one period of the inductive position sensor from the first position vector and the second position vector for further periods of the first position signal and the second position signal of the inductive position sensor, comparing the calculated phase spectrum of the first position signal and the phase spectrum of the second position signal of different periods of the first position signal and the second position signal of the inductive position sensor to detect a change in the phase spectrum of the first position signal and/or in the phase spectrum of the second position signal, wherein the initially calculated phase spectrum of the first position signal and the initially calculated phase spectrum of the second position signal are stored as first initial phase spectrum and second initial phase spectrum and all afterwards calculated phase spectrums for the first position signal and the second position signal are compared to the first initial phase spectrum respectively second initial phase spectrum.