Gas water heaters generally cost less to operate, while electric water heaters cost less up front and less to install. Electric heaters are also safer and require less maintenance.
The first consideration in buying a water heater is availability of energy sources. Electricity is available almost everywhere, but natural gas is not available in some areas. Propane gas is another alternative, but the costs for delivery and storage drive up its costs. Where natural gas is available, it is usually the least expensive energy source for a heater. ConsumerReports.org estimates that a gas water heater usually costs about only half as much to run as an electric model, meaning that it can recoup its higher up-front cost in as little as a year.
Gas water heaters require a venting system and a gas supply line. These requirements drive the cost of installation up. They also limit the places where a gas water heater can be placed in a home. Electric water heaters, especially point-of-use and tankless models, can be installed almost anywhere in a house. One caveat is that putting a new electric water heater in an older house may require both rewiring and replacement of the electric panel to handle the higher amperes required by the new system, increasing installation costs.