Every year, millions of women are faced with a serious global health issue: breast cancer. This research aims to improve the efficiency of breast cancer classification using machine learning. One of the main challenges encountered is the imbalance between the number of malignant and benign cases in the dataset. Therefore, this study aims to compare the performance of several machine learning algorithms in classifying breast cancer, such as Decision Tree, Naive Bayes, K-Nearest Neighbors, Logistic Regression, and Random Forest. Preprocessing data, dividing data with various ratios, and testing various classification algorithms are the techniques used in this research. The dataset used originates from the Wisconsin Breast Cancer Diagnosis dataset from the Kaggle platform. The Synthetic Minority Over-Sampling Technique (SMOTE) is used to achieve balance in the proportions of imbalanced classes. After hyperparameter tuning, Logistic Regression showed the best performance with accuracy reaching 100% in several situations. This study concludes that the use of machine learning, especially with techniques for handling class imbalance, can improve the ability to detect breast cancer early. Additionally, this research also helps understand the best algorithms to improve accuracy in classifying breast cancer, providing support for healthcare professionals in early diagnosis, and enhancing the quality of patient care.