For COVID-19, infected individuals are isolated from the community when they become symptomatic, and when they become recovered individuals who have immunity, they return to the community. With an increase in the number of recovered individuals in the community, the contact rate between infected individuals and susceptible individuals decreases, resulting in a decrease in the number of infected individuals. Vaccination causes not only a decrease in the number of susceptible individuals in the community but also a reduction in the contact rate between infected individuals and susceptible individuals with an increase in the number of vaccinated individuals, as do the recovered individuals. From the viewpoint of herd immunity, the vaccination duration, which is the period between the start and the end of mass vaccination, must be examined because the number of vaccinated individuals actually increases gradually daily according to vaccination programs, and the total number of vaccinated individuals depends on the mass vaccination duration, controlling the spread of COVID-19. How long should we continue mass vaccination to contain the COVID-19 pandemic from a physical viewpoint? The number of infected individuals by different mass vaccination durations was calculated by a flexible compartment model specific to COVID-19. The model contains the vaccination rate as an independent variable in the calculation equations and, as the dependent variable, the number of isolated/recovered individuals and the population excluding the individuals kept in isolation, both of which affect the contact rate between infected individuals and susceptible individuals. The effect of the mass vaccination duration can be evaluated by comparing the total number of infected individuals among the cases with different mass vaccination durations for the cases with different start dates of vaccination, with different vaccination rates and with different symptomatic rates. The results show that since the contact rate decreases with an increase in the number of vaccinated individuals, the earlier the start date of vaccination is, the smaller the total number of infected individuals becomes, and the longer the mass vaccination duration is, the smaller the total number of infected individuals becomes. The results also showed that when vaccination is continued until the day when the sum of the number of recovered individuals and the number of vaccinated individuals exceeds an ‘expedient herd immunity threshold’, the total number of infected individuals is significantly reduced, and the duration of infection is also markedly shortened, as expected for the case with a sufficient mass vaccination duration.