6 feet
Main breaker panels have a built-in main breaker which can be used to shut off all power to your residence. A main breaker is a large double-pole circuit breaker that limits the amount of electricity coming in from outside to protect the circuits it feeds. It also identifies your breaker panel’s amperage capacity. For example, a breaker panel of 100 amps will only allow 100 amps of electricity to flow through it without tripping. They’re also identified by the number of circuits they accommodate. For example, a 150-amp, 30-circuit panel can handle 150 amps of electricity with room for 30 circuit breakers. Safety. The space between electrical panels and adjacent walls is also regulated by the layout of your home and the need for safety. Sparks and high temperatures are possible if an electrical panel fails or experiences a surge. This means that you can't place it close to combustible materials in your home. Electrical panels mount in interior walls or hang on basement walls. However, they might require horizontal clearance, preventing them from being mounted in corners or other tight spaces. Installation provides a practical limit on where you can install an electrical panel. Code Requirements. The National Electrical Code requires the placement of an electrical outlet no further than 6 feet from a door. However, there is no code stating how close to a door an outlet can be installed. Therefore, you can install an electrical outlet as close to a door as you desire.  All of your home's power is located in the service panel. The electrical service panel provides 100, 200, or more amps of power to a home. Power comes into the house from a service drop, connects to the lugs within the service panel, and is split into separate circuits throughout the house.  A breaker panel, also known as a load center, service panel, breaker box or electrical panel, is a steel box that holds multiple circuit breakers wired to circuits that distribute power throughout your home. For example, a breaker panel of 100 amps will only allow 100 amps of electricity to flow through it without tripping. They’re also identified by the number of circuits they accommodate. For example, a 150-amp, 30-circuit panel can handle 150 amps of electricity with room for 30 circuit breakers. We should ban cars. Bottom line is an electrical panel can not be in a bathroom, and working space about a panel is required to be at least 30 wide and 36 deep. By making a 36x36 room for the panel you will meet both codes. So I will need to move the door 3 feet in front of the panel I guess. The closest wet location is the vanity you can see roughed-in in the picture, to the left of the panel. It's around 4 ft from the panel itself. Installation. Electrical panels mount in interior walls or hang on basement walls. However, they might require horizontal clearance, preventing them from being mounted in corners or other tight spaces. Installation provides a practical limit on where you can install an electrical panel. For an interior wall, the closest the panel can be to a perpendicular wall is the space between that wall and the nearest stud, where the panel will be mounted for support My thinking is that as far as the NEC is concerned the panel and any service conduits entering it can be as close to a window as you desire. 230.9 applies to open conductors and cables. The SF box seems to be an added requiremnt by local AHJ. But here is the Main issue: I was told that panels are legally installed in San Francisco County all the time within less than 3 feet from a window if the panel has a box (wooden or otherwise with doors and hinges) built to surround and enclose the electrical panel. Of course this box is attached to the building As far as the electrical equipment goes there is nothing beyond the working clearances. The equipment can be directly adjacent to either item. Working clearance for a panel is 30 wide and 36 deep (in front). The equipment can be anywhere in the 30 wide space. There may be a gas code clearance issue, but I am not familiar with that code.
http://www.homedepot.com/c/which_breaker_box_is_right_for_your_home_HT_BG_EL http://www.ehow.com/info_12178317_close-walls-can-electrical-panels-be.html http://www.ehow.com/decision_6856831_far-should-electrical-outlet-installed_.html http://homerenovations.about.com/od/electrical/a/artservicepanel.htm http://www.homedepot.com/c/which_breaker_box_is_right_for_your_home_HT_BG_EL http://www.doityourself.com/forum/electrical-ac-dc/486170-distance-between-electrical-panelboard-bathroom.html http://www.ehow.com/info_12178317_close-walls-can-electrical-panels-be.html http://forums.mikeholt.com/showthread.php?t=127489 http://diy.stackexchange.com/questions/48248/electric-panel-distance-from-windows-and-or-gas-service-entry
how far from a door can an electrical panel be