ABSTRACT As the elderly population rises, the growth rate of age-related diseases such as Alzheimer’s disease and cognitive impairments increases. Wandering is one of the first and the most progressive and challenging behaviors; that manifest with certain patterns in the mobility behavior of the patients in the early stages of the disease. Timely diagnosis of wandering can prevent irreparable damages, including the risk of losing the patient, severe physical injuries caused by accidents, and even death. So far, numerous studies have focused on the development of wandering detection algorithms. Most of these mainly rely on two approaches of extracting features from patients’ trajectory history and estimating the path complexity. Motion signal processing methods have rarely been used in this area. An important consideration for these patients is the instability in their movement behaviors, which has received limited attention in previous research, leading to less compatibility of models with this feature. Therefore, this paper proposes an algorithm based on motion signal processing using the Short-time Fourier transform (STFT). This algorithm detects wandering patterns only by using the patient’s trajectory data and changes in their zero and non-zero frequency components. The efficiency of the proposed algorithm has been evaluated using the Geolife open-source dataset, considering the macro-average of metrics such as accuracy, precision, specificity, recall, and F-score, achieving respective values of 96.38%, 94.89%, 96.36%, 96.36%, and 95.58%. The results have validated the proposed algorithm’s strong performance in diagnosing wandering behavior, which, on one hand, helps prevent adverse consequences and, on the other hand, aids in the diagnosis and predicting the progression of the disease to severe Alzheimer’s stage.