We evaluate the causal effect of class size (number of students in a classroom) on incidence of class closure due to the flu, as an outcome of an infectious disease epidemic. For identification of causal effects, we apply a regression discontinuity design using discontinuous variation of class sizes, around the class size cap set by regulation, to administrative data of public primary and middle school students in one of the largest municipalities within the Tokyo Metropolitan Area from 2015 to 2017. Most classrooms in Japan are constructed in accordance with a standard of classroom area, 63 m 2 ; class size reduction improves social distancing among students in a classroom. We find that class size reduction is effective in reducing class closures due to the flu: a one-unit reduction of class size decreases class closure by about 5%; additionally, forming small classes with twenty-seven students at most, satisfying the social distancing of 1.5 m recommended to prevent droplet infection including influenza and COVID-19, reduces class closure by about 90%. Moreover, we find that the older the students, the larger the effects of class size reduction. Our findings provide evidence for the effectiveness of social distancing policy in primary and middle schools to protect students from droplet infectious disease spread, including COVID-19.