The research centers on the essential function of loans in driving economic expansion and the intrinsic danger of loan defaults. Small businesses play a crucial role in generating employment and fostering economic growth, highlighting the significance of precise loan eligibility evaluations. The Small Business Administration's (SBA) 7(a) loan program seeks to assist small businesses by providing loan guarantees to mitigate risks for financial institutions (Mini et al., 2018). The study utilizes sophisticated machine learning methods, particularly the Random Forest and XGBoost algorithms, to forecast loan defaults and ascertain ideal loan amounts for small businesses. A dataset comprising 27 variables is analyzed, encompassing loan attributes, borrower details, and loan outcomes. The results highlight the effectiveness of both Random Forest and XGBoost in generating loan default predictions, with a slight edge for XGBoost. Additionally, Linear Regression is used to estimate loan amounts for qualified borrowers. The analysis identifies key factors contributing to loan defaults, with variables such as Term, Disbursement Gross, SBA Approval, and Gross Approval playing a significant role in Random Forest predictions. The study reveals intriguing patterns in loan defaults across various industrial sectors, emphasizing the complex nature of assessing loan performance within these industries (Zhou et al., 2023). This research aims to improve lending practices, benefiting both lenders and borrowers while enhancing our understanding of risk management in the context of small businesses.