This year’s midwinter vacation will shrink from five days to two to make up for school days cancelled because of Hurricane Sandy, city and union officials announced today.

The city closed schools for five days because of the storm, and some particularly hard-hit schools were closed even longer. In addition to interrupting students’ schooling, the lost time dropped the city below the 180 instructional days required to receive state school aid.

Now, according to a city-union deal, students will attend school on four days they were supposed to have off: Feb. 20-22 and June 4. The February days had been part of a weeklong break that has been part of the calendar since 1990, and the June date had been scheduled as a “clerical day” for teachers and school staff.

With four days added back to the calendar, the school year is now set to be 181 or 182 days, depending on what grade students are in. That leaves a slight cushion for snow days, but if more than one day is cancelled, additional makeup days will have to be identified.

UFT Secretary Michael Mendel said union officials had their fingers crossed that weather conditions won’t merit closing schools this winter, as they have in each of the last two years, because there simply aren’t many more days to choose from when rescheduling.

“We’re going to get shovels out and we’re going to make sure it doesn’t snow,” he said.

State officials are allowed to waive the 180-day requirement for districts that have had to cancel many days of school, but that can happen only after the districts have already turned all available vacation days into makeup days.

Walcott, UFT President Michael Mulgrew, and CSA President Ernest Logan announced the agreement in a joint statement Monday afternoon.

“Teachers, principals, and the school community made an extraordinary effort to get our schools back online after the storm, and by working together, we were able to open most schools with minimal disruption,” they said. “It is just as important that we recover the time lost, and this agreement will provide students with additional class instruction.”

In a separate message to teachers, Mulgrew sounded a slightly different note, noting that teachers had asked why the city did not ask the state to forgive the days and signaling that he thought many would not want to make up the missed time. “It’s not easy, but we have to make up these days,” he wrote. “It is required under the law.”

Mulgrew said the UFT had convinced the city to make special allowances for members who can show that they have already paid for “airline tickets or cruises” for the February break. Those teachers will be allowed to use sick days instead of vacation days or take the days off without pay, he wrote in the message to teachers, and their absences cannot count against them in their end-of-year ratings.

About 20 schools will have to make up one or more additional day because they served as a shelter site or did not have power when most schools resumed classes, according to a department spokeswoman, Connie Pankratz. She said the principal and union chapter leader in each of the schools would have to work together to decide how to make up the missed time.

Walcott was mum about the impending agreement on Monday morning, when he joined State Education Commissioner John King to visit several schools that were damaged by the storm.

“Hopefully we’ll be announcing something soon, but our goal is to make sure our students are in school, getting the maximum amount of learning time,” Walcott said.

“We’ve got to find the time,” King said. “That will be challenging. It might require sacrificing some vacation days, but I know that chancellor and the bargaining units will get to a resolution fairly soon.”

The announcement about the plan to restore the days came about eight hours later.

Some families are sure to share teachers’ quandary about whether to miss school days or forgo planned vacations. But the shortened vacation is likely to come as a relief to other families because they will not have to find as many days of child care.

Lindsay Manley, a mother at Brooklyn’s P.S. 8, said the news came as a relief to her family for a different reason. Manley said that when she told her husband about the schedule change, he said, “Solves that problem!” What problem? she asked. Her husband answered, “The one where we couldn’t figure out where to go!”