This study thoroughly examined the use of different machine learning models to predict financial distress in Indonesian companies by utilizing the Financial Ratio dataset collected from the Indonesia Stock Exchange (IDX), which includes financial indicators from various companies across multiple industries spanning a decade. By partitioning the data into training and test sets and utilizing SMOTE and RUS approaches, the issue of class imbalances was effectively managed, guaranteeing the dependability and impartiality of the model’s training and assessment. Creating first models was crucial in establishing a benchmark for performance measurements. Various models, including Decision Trees, XGBoost, Random Forest, LSTM, and Support Vector Machine (SVM) were assessed. The ensemble models, including XGBoost and Random Forest, showed better performance when combined with SMOTE. The findings of this research validate the efficacy of ensemble methods in forecasting financial distress. Specifically, the XGBClassifier and Random Forest Classifier demonstrate dependable and resilient performance. The feature importance analysis revealed the significance of financial indicators. Interest_coverage and operating_margin, for instance, were crucial for the predictive capabilities of the models. Both companies and regulators can utilize the findings of this investigation. To forecast financial distress, the XGB classifier and the Random Forest classifier could be employed. In addition, it is important for them to take into account the interest coverage ratio and operating margin ratio, as these finansial ratios play a critical role in assessing their performance. The findings of this research confirm the effectiveness of ensemble methods in financial distress prediction. The XGBClassifier and RandomForestClassifier demonstrate reliable and robust performance. Feature importance analysis highlights the significance of financial indicators, such as interest coverage ratio and operating margin ratio, which are crucial to the predictive ability of the models. These findings can be utilized by companies and regulators to predict financial distress.