The COVID-19 outbreak has forced countries to take extensive measures aimed at minimizing human contact. In this crisis period, distance education has played a crucial role in ensuring continuous learning. However, not all locations have had the same maturity level regarding infrastructure availability, and the city-level heterogeneity in socioeconomic structures might have impeded equal access to distance education. This paper focuses on the contextual dimension of distance education by a comparative approach between in person and distance education outcomes in Turkey. By a multilevel modelling approach, student outcomes are examined against a set of student-level and city-level determinants of academic success during the COVID-19 period compared to the same academic semester in the previous year. The findings support previous studies, discussing the long-term contextual effects on student outcomes and show that the digital divide between the rural and urban areas and income inequality are the main drivers of city-level variation in students' success during the pandemic.