Stroke is a dangerous health issue that happens when bleeding valves in the brain get damaged. and blood supply to the brain is cut off. As a result of these factors, numerous body parts may cease to function. Stroke is currently a significant risk factor for mortality, as per World Health Organization (WHO). It may be preferable to mitigate the severity of stroke by detecting it early. In recent years, data science has been critical to the growth of research in the medical field. Various machine learning techniques are built employing a patient’s physical and physiological reporting data to forecast the risk of stroke. In this article, we use five machine learning approaches to find the best effective model that can predict the risk of stroke, including Decision Tree (DT), XGBoost, Light Gradient Boosting Machine (LGBM), Random Forest (RF), and K-nearest Neighbors learning. Kaggle was used to collect the dataset. Random forest produces acceptable findings with an accuracy of roughly 96%, which might be included in actual clinical information. The machine learning approach can aid in the prediction of many diseases like a stroke in the early stages.