It primarily depends on three factors
- cost of electricity
- cost of natural gas
- efficiency of the water heater
A therm factor is used by gas companies to convert the volume of gas used to its heat equivalent, and thus calculate the actual energy use. 1 Therm = 100,000 BTU and is approximately equal to 29.3 kWh. Look at your last natural gas bill to determine the "cost per therm".
Since your natural gas water heater is not 100% efficient, you are paying for some gas that is “wasted”. For the purposes of this answer, I will assume the water heater is 60% efficient.
We will assume that the electric water heater is nearly 100% efficient. Every watt of electricity is converted to heat in the water.
If the same amount of energy needs to be applied to the water, then the break even point is when the cost of natural gas equals the cost of electricity.
Price per therm ÷ 0.60 = Price per kWh x (29.3 kWh / therm)
0.60 is assumed to be the efficiency of the natural gas water heater.
Solving for price per therm:
Price per therm = (Price per kWh) x (29.3 kWh / therm) x 0.60
Assuming the cost of electricity is $0.10 per kWh, the break even point is when natural gas costs:
$0.10 x 29.3 x 0.60 = $1.76 per therm.
Assuming an electric rate of $0.10 per kWh, if the cost per therm is less than $1.76, then the natural gas water heater is more economical.
Look at your latest electric and gas bills to find your energy rates and plug them into the equations above.
Don’t forget that most natural gas water heaters have a pilot light that consumes some gas even when it is not heating the water.
Good luck.