You want a minimum of 4 inches between the wall and the back of the oven but 6 inches is a preferable space. The 4 inch space is for safety reasons. The oven needs the space for heat ventilation. You don't want your oven to overheat and possibly start a fire.