Breast cancer is a major global health concern and ranks as one of the leading causes of cancer-related mortality in women. This research focuses on utilizing the stochastic gradient boosting (SGB) technique to classify breast cancer data from open-access sources and identify key risk factors. The dataset was employed to develop a classification model, with SGB used for the disease classification process. The performance of the model was assessed using metrics such as accuracy, balanced accuracy, sensitivity, specificity, and both positive and negative predictive values. The SGB model achieved perfect results with 100% in all key metrics, including accuracy, sensitivity, specificity, and the F1 score. Additionally, the study identified the most significant risk factors, including “cave_points_mean,” “area_worst,” “perimeter_worst,” and “concave_points_worst,” which were found to have the highest importance. The findings suggest that the SGB-based model can effectively differentiate between breast cancer patients and healthy individuals while also pinpointing critical risk factors, thus contributing to more accurate diagnosis and risk prediction.