MASSACHUSETTS school districts lost 3.9 percent of their students this year, amid a pandemic-related public school exodus, but those students are not spread evenly across the state. The districts that lost the most students include a mix of densely populated urban districts and wealthy Boston suburbs.

Boston, the largest district in the state, unsurprisingly lost the most students statewide – 2,368, or 4.7 percent of its total enrollment. Worcester and Springfield, the second and third largest districts in Massachusetts, lost 1,058 and 768 students, respectively, or 4.2 percent and 3.1 percent of their population. All three districts started the year with remote learning.

According to Boston officials, the district actually had fewer withdrawals than in prior years – but it had a much larger drop in new enrollments, because new students were not moving in from other states, countries, and cities.

While many pre-k and kindergarten students are likely staying home, older students switched to private schools and homeschooling. In total, state officials say there are 37,000 fewer students in public school this year than last year.

Interestingly, the town of Brookline actually lost more students than Springfield, despite having one-third of the population. There were 886 students who left the Brookline public schools, or 11.4 percent of their total student population.

Brookline schools started the school year mostly remotely – kindergarteners and high-needs students returned in person — then transitioned to a hybrid model in October. Demographically, Brookline is a relatively wealthy Boston suburb, with a high concentration of Asian students and a large number of students whose first language is not English.

Brookline school committee member Helen Charlupski said the district’s kindergarten numbers are down because the district decided fairly late that it would return kindergarteners to school in-person full time, so some parents kept their kids in private preschools that have kindergarten options. The district also attracts a lot of students from abroad because the parents take fellowships or jobs at nearby hospitals, universities, or high-tech companies. Many international students left, and new families did not arrive. Some families switched to private schools.

Several other wealthy Boston suburbs also had big enrollment drops, though not as large as Brookline’s. Newton lost 755 students, or 5.9 percent of its total enrollment. Wellesley lost 430 students, or 8.8 percent of students.

Other big drops were in Gateway Cities, though some of that simply reflects large student populations. Lawrence lost 708 students, or 5.2 percent of its population; Brockton lost 640 students, or 4.0 percent of population; and Lynn lost 501 students, or 3.1 percent of population.

Some smaller districts saw even larger enrollment decreases as percentages of their student population. For example, Bourne, on Cape Cod, lost 257 students – which translates to 13.5 percent of its students. The district started the school year remotely despite relatively low rates of COVID-19. Saugus, which started remotely due to a high incidence of COVID-19, lost 310 students, or 11.9 percent.

One community that bucked the trend was Salem, which started the year remotely after it was ranked high-risk in the state’s COVID-19 measures, with some high-needs students returning in person. Some additional students have since returned with a hybrid model. Salem actually gained 114 students – or 3.1 percent – compared to last year.

At a meeting of the Board of Elementary and Secondary Education on Tuesday, several school board members asked about potential racial and geographic disparities in who had left public schools. Russell Johnston, senior associate commissioner with the state education department, said none of that analysis had been done yet, so he could not speak to those differences.

The numbers are important because the allocation of education aid is based on district enrollment numbers.