The main reason for owning a laptop is portability, but batteries only get you so far. An extension cord solves this problem without relying on nearby outlets. Even if you own a desktop, you might need to put it where there isn't an outlet. You can do this safely by getting the right cord and using it properly.
When you're shopping for an extension cord, there are two electrical ratings you need to know. The first is how much wattage it will handle, and the second is how much current it can carry. Computers and their accessories use a lot of power, and you need a heavy-duty cord for these applications. Make sure your cord is rated for at least 1,825 watts and it can handle 125 volts of current. A 15-amp cord is designed for these loads.
Heavy-duty cords come in 12- and 14-gauge sizes, but most 12-gauge cords are made for 220-volt appliances like clothes dryers and ovens. The lower the gauge, the more current a cord can carry, so lightweight cords are 18, medium-weight cords are 16 and heavy-duty cords start at 14. 14-gauge is the right size for your computer, but you should also make sure that its plug is a three-prong, grounded design. If you intend to use the computer outside, its cord must also be well-insulated to protect it from the elements.
Getting the right cord is only half the battle; you also have to use it properly. Never run extension cords under rugs, carpet or furniture, since concealing them increases the risk of a fire. You should also run your cords along the wall to keep them out of foot traffic. If a cord's placement will increase wear and tear or the risk of an accident, like stretching it across a doorway or in front of a desk, you should find a safer option.
You can avoid electrical problems by learning good safety habits. Always push the plug of an extension cord all the way into the wall and never pull it out by the cord. When you use power strips, only use one with each extension cord. Daisy-chaining them can overload a cord or the outlet it's plugged into, and that could blow a circuit breaker or start a fire. It's also a good idea to unplug extension cords every night, since they aren't intended to be a permanent replacement for wall wiring.