Breast cancer (BC) is a catastrophic global health concern that causes numerous fatalities worldwide. Early detection of breast cancer may mitigate death rates; however, the prevailing diagnostic procedure for the malignancy necessitates numerous multifaceted laboratory tests that must be performed by medical professionals. In this article machine learning, a branch of Artificial Intelligence (AI), has been employed to improve cancer diagnosis, prognoses and survival rates while reducing the vulnerability of humans. Support Vector Machine (SVM), K-nearest Neighbors (KNN), Decision Tree (DT), Random Forest (RF) and Grey Wolf Optimizer (GWO) are implemented to prognosticate breast cancer. Comprehensive insights into the efficacy of these approaches for breast cancer prognosis are provided by the performance assessment that is accomplished using the confusion matrix, Receiver Operating Characteristic (ROC) curves and parallel coordinate plots. Both UCI (University of California Irvine) and SEER (Surveillance, Epidemiology and End Results) datasets have been utilized to confirm the investigation's findings and ensure their generalizability across diverse data sources. The results conclusively demonstrate that SVM is the cohort's most accurate classifier. With a stupendous accuracy rate of 99.1 %, the GWO-SVM compares favorably to all other algorithms. Furthermore, feature reduction approaches such as Minimum Redundancy Maximum Relevance (mRMR), ReliefF and Principal Component Analysis (PCA) are utilized. ReliefF has demonstrated exceptional effectiveness with a maximum accuracy of 98.2 %.