The accurate prediction of band gaps in rare earth metal oxide nanoparticles is crucial for their application in various fields, including catalysis, solar cells, electronics, waste water treatments, and solid oxide fuel cells. This study presents reports of machine learning (ML) algorithms to predict the band gaps of cerium dioxide (CeO2) and neodymium oxide (Nd2O3) nanoparticles with high precision. Band gap data were obtained from experimental and computational sources using ultraviolet (UV)-visible spectrophotometry and applying the Wood and Tauc equations. Seven ML models, including Random Tree (RT), Linear Regression (LR), Instance-Based k-Nearest Neighbors (IBK-KNN), Multilayer Perceptron (MLP), Random Forest (RF), Support Vector Machine–Regression (SVR), and Additive Regression (AD), were employed. The models were trained using these ML models and validated using rigorous cross-validation techniques to ensure their generalizability and reliability. The findings demonstrate that the ML models performed significantly by achieving a correlation coefficient of 1.00, a mean absolute error (MAE) below 0.01 eV. The developed ML model not only enhances the understanding of band gap behavior in CeO2 and Nd2O3 but also provides an optimization of band gap values of rare earth metal oxides nanomaterials.