Water heaters use either natural gas or an electric coil to heat the water in the tank. Gas water heaters are less energy-efficient than electric water heaters, so the cost of electricity or gas may make either of those a better choice in some cases. Regardless of whether a water heater is gas or electric, similar problems can arise, and costs to replace the thermostat or heating element in a gas or electric water heater are usually about the same.