March 15, 2018 -- I have lived in my tiny, 1 ½ story house in Boston since 1994, and I want to upgrade my electrical panel from 100 amps to 200 amps. The current panel is located in my basement, which floods every few years. In fact, the constant flooding became so vexing that I moved my washer and dryer upstairs to a small room off of my dining room. I also got rid of my traditional water heater and replaced it with a tankless water heater that is also now located in the same room as the washer and dryer upstairs. May I move my electrical panel to that room, too? The only spot available would be on a wall that is about 3 feet wide between the door and a window that has pretty cotton curtains. Would there be enough clearance? Would the curtains be considered a fire hazard? How about laundry detergent and bleach bottles about 4 to 5 feet away? If not the laundry room, can I put an electrical panel outside? Would I need to build a little side structure? If so, how large would it have to be?
Take a look at the image below. Code requires you have at least 3 feet in front of the panel, 6.5 above, and 30 inches side to side. There is a trick with the 30 inches that it can be measured from either side of the panel, dead center, etc. so you get some wiggle room there. Based on what you've said about your laundry room, it sounds like code-wise it will probably work. (Although bear in mind some regions apply additional codes)
However, you also need to take into account what's in the wall. Between a door and window you'll have king studs and who knows what other load bearing stuff that could interfere with box placement or getting wires to the box. There is also the issue with wires being short when rerouted so now you'd need to make additional splices which could require water-proofing if they are still below flood level.
You can purchase outdoor breaker boxes which are rated NEMA-3-ish which means they are suitable for outdoor use and protect from rain, but as Harper mentioned, they don't protect for dust, bugs, etc. I would also agree with Jim that moving the panel would not be a cheap option. My guess is you could pop some concrete in the basement, dig a hole, and put in a good sump pump with a failure alarm for far less that moving the panel will cost.
NEC 230.70(A)(1) Readily Accessible Location. The service disconnecting means shall be installed at a readily accessible location either outside of a building or structure or inside nearest the point of entrance of the service conductors.
Be prepared to move your meter and power entrance point.
You're not allowed to cart the power halfway around the house from the meter to the main breaker, because that wire run would have no short protection. You can get a "meter pan" (the dock for the meter) which has a main breaker as part of it, and that solves that problem.
240.24(E) Not Located in Bathrooms. In dwelling units, dormitories, and guest rooms or guest suites, overcurrent devices, other than supplementary overcurrent protection, shall not be located in bathrooms.
230.70(A)(2) Bathrooms. Service disconnecting means shall not be installed in bathrooms.
Neither the main shutoff/breaker nor the service panel can be in a bathroom.
240.24(D) Not in Vicinity of Easily Ignitible Material. Overcurrent devices shall not be located in the vicinity of easily ignitible material, such as in clothes closets.
You need to think about positioning of flammable materials near panels. The curtains may need to go.
100 Location, Damp. Locations protected from weather and not subject to saturation with water or other liquids but subject to moderate degrees of moisture. Examples of such locations include partially protected locations under canopies, marquees, roofed open porches, and like locations, and interior locations subject to moderate degrees of moisture, such as some basements, some barns, and some cold-storage warehouses.
I don't get a laundry room as this; I've never heard of a laundry room getting that wet unless there's a problem. That renders irrelevant the various rules for panels in damp/wet locations IMO.
Now, since you're thinking about flooding, take a close look at the Youtube videos of old news reporting about the Houston floods. One thing that really struck me was 2-storey apartments with 3 feet of water in the first floor, first floor tenants were being given refugee space by 2nd floor tenants, and the electricity was on. That is because the service drop and panels come into the second floor. Now there's a Code requirement that each tenant have access to his own breakers, so the 1st floor panels are probably in 2nd floor commons space, but any circuits which descend to the first floor, have GFCI breakers* The first floor floods, the GFCI breakers trip, and nobody gets electrocuted and the service is not affected. That's how you do that thing.
*(or other GFCI protection which also protects the wires down to the first floor, which GFCI+receptacles do not).