For safety reasons most especially when they’re to be worked on, electrical panels need to have space around them.
Empty spaces needs to be around electrical panels; for safety reasons when they are to be worked on. Know more about those clearances.
The required working clearance around an electrical panel
Imagine seeing your most loved refrigerator; the amount of space the refrigerator would ordinarily need is just about the same as the working clearance you would need right in the front of an electrical panel. Let’s look at the ABCs; the actual working space and the path to getting there. These are basic requirements. The working space having a depth of 36 inches. And at least, the width of the working space being 30 inches or of the panel, whichever one is greater. The panel, however is not required to be centrally positioned on the working space. It could be on any of the sides. The panel door must be at least be able to be opened at an angle of 90 degrees, so this must have been factored into the working space. The working space must be of height 6-1/2 feet.
The protrusion of the other electrical equipment which are on the top or under the panel cannot be more than 6-inches from the front of the panel. And the space which is equal in depth and width of the panel which extends from the structural ceiling to the floor is meant for electrical equipment; this means there’s no room for ductwork, gas pipes or plumbing or any foreign equipment. The clearances are put in place for the sole purpose of protecting anyone that might need to work on the panel. With your hands pinned to your sides, it may be extremely difficult for you to work.
And the dedicated space for electrical equipment, extending from the structural ceiling from the floor which is equal to depth and width
Also, panels are meant to be readily and easily accessible, which means that the space should not be utilized as a storage space, be situated over the means of a stairway or that a ladder would be needed to get to it. They can also not be installed in areas such as clothes closets or places where there are materials that could be easily ignited. And to also avoid corrosion problems, they cannot be installed in areas of high moisture such as bathrooms.
Code requirements which are specific to your area could be gotten from your local electrical inspector.