Background and purposePost-stroke cognitive impairment (PSCI) is highly prevalent in modern society. However, there is limited study implying an accurate and explainable machine learning model to predict PSCI. The aim of this study is to develop and validate a web-based artificial intelligence (AI) tool for predicting PSCI. MethodsThe retrospective cohort study design was conducted to develop and validate a web-based prediction model. Adults who experienced a stroke between January 1, 2004, and September 30, 2017, were enrolled, and patients with PSCI were followed up from the stroke index date until their last follow-up. The model's performance metrics, including accuracy, area under the curve (AUC), recall, precision, and F1 score, were compared. ResultsA total of 3209 stroke patients were included in the study. The model demonstrated an accuracy of 0.8793, AUC of 0.9200, recall of 0.6332, precision of 0.9664, and F1 score of 0.7651. In the external validation phase, the accuracy improved to 0.9039, AUC to 0.9094, recall to 0.7457, precision to 0.9168, and F1 score to 0.8224. The final model can be accessed at https://psci-calculator.my.id/. ConclusionOur results are able to produce a user-friendly interface that is useful for health practitioners to perform early prediction on PSCI. These findings also suggest that the provided AI model is reliable and can serve as a roadmap for future studies using AI models in a clinical setting