Vaccination causes not only a decrease in the number of susceptible individuals in the community but also an increase in the number of individuals who are resistant to COVID-19 infection, causing a marked decrease in the total number of infected individuals. Additionally, 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, with a considerably shortened duration of infection. However, vaccine-induced immunity in vaccinated individuals decreases gradually, and when it decreases to below a certain threshold several weeks after vaccination, vaccinated individuals realistically get back to susceptible individuals, and breakthrough infection can occur. The number of susceptible individuals is affected not only by the change in the number of infected individuals but also by the change in the number of vaccinated individuals and, additionally, by the change in the number of individuals who get back to susceptible individuals from vaccinated individuals. As a result, the process of the spread of COVID-19 is complicated. Using a flexible compartment model specific to COVID-19, changes in the number of individuals infected with breakthrough infection were calculated. The model includes the vaccination rate and duration of vaccine-induced immunity, which indicates the validity period of the effectiveness of vaccine-induced immunity, and the ‘back to rate’, which indicates the ratio of the number of individuals who get back to susceptible individuals from vaccinated individuals as independent variables in the calculation equations. Changes in the number of infected individuals were examined in relation to the duration of vaccine-induced immunity and to the duration of mass vaccination to avoid the occurrence of breakthrough infection. The results revealed that when mass vaccination was continued until the day, which was determined by the duration of vaccine-induced immunity, the vaccination rate and the start date of vaccination, breakthrough infection did not occur. However, when mass vaccination ended before that day, breakthrough infection occurred several weeks after the end of the mass vaccination program. The occurrence of breakthrough infection caused not only ‘breakthrough infections’, which indicate that infections occurred in susceptible individuals who had got back from recovered individuals but also ‘normal infections’, which indicate that infections occurred in the ‘original’ susceptible individuals, with a severe increase in the number of infected individuals together with a markedly long duration of infection. However, even if breakthrough infections occur, if the second mass vaccination is performed immediately after the occurrence of breakthrough infection, outbreaks of infections, including breakthrough infections and normal infections, will be controlled.