This includes painting the house or repairing the roof or water heater. But there's a catch, and it all boils down to timing. “If you needed to make home improvements in order to sell your home, you can deduct those expenses as selling costs as long as they were made within 90 days of the closing,” says Zimmelman.