Educational inequality between rural and urban areas remains a significant challenge in Bangladesh, where differences in infrastructure, technology, and academic support shape students’ learning outcomes. This study investigates these disparities using survey data collected from 145 respondents, organized into separate primary and high school datasets and analyzed using descriptive statistics and supervised machine learning. The analysis focuses on educational resources, digital facilities, internet access, private tutoring, teacher support, and academic performance. Four classification models were com pared: Logistic Regression, Support Vector Machine (SVM), Random Forest, and Extreme Gradient Boosting (XGBoost), each trained to classify rural and urban educational backgrounds and evaluated using accuracy, precision, recall, F1-score, and five fold cross-validation. The results reveal substantial rural–urban differences in educational resources, with urban students reporting higher internet availability, greater access to digital devices, more computer laboratory facilities, and higher rates of private tutoring, and better facilities associated with improved academic performance. Logistic Regression achieved the highest accuracy, reaching 79% for the primary school dataset and 83% for the high school dataset. The findings highlight greater inequality at the high school level and demonstrate the potential of machine learning to identify educational disparities, supporting the need for improved educational infrastructure and digital accessibility in Bangladesh.
