BACKGROUND: Sarcopenia is a common complication in patients with stroke, adversely affecting recovery and increasing mortality risk. However, no standardised tool exists for its screening in this population. This study aims to identify factors influencing sarcopenia in patients with stroke, develop a risk prediction model and evaluate its predictive performance. METHODS: Data from 794 patients with stroke were analysed to assess demographic and clinical characteristics. Variable selection was performed using least absolute shrinkage and selection operator (LASSO) regression, followed by multivariate regression analysis. Logistic regression (LR), random forest (RF) and XGBoost algorithms were used to construct prediction models, with the optimal model subjected to external validation. Internal validation was conducted via bootstrap resampling, and external validation involved an additional cohort of 159 patients with stroke. Model performance was assessed using the area under the curve (AUC), calibration curves and decision curve analysis (DCA). RESULTS: Seven variables were identified through LASSO and multivariate regression analysis. The LR model achieved the highest AUC (0.805), outperforming the RF (0.796) and XGBoost (0.780) models. Additionally, the LR model exhibited superior accuracy, precision, recall, specificity and F1-score. External validation confirmed the LR model's robustness, with an AUC of 0.816. Calibration and DCA curves demonstrated their accuracy and clinical applicability. CONCLUSIONS: A predictive model, presented as a nomogram and an online risk calculator, was developed to assess sarcopenia risk in patients with stroke. Early screening using this model may facilitate timely interventions and improve patient outcomes.