I did the math for mine the othet day....it is dependent on temperature rise.
If heating from 60 degree water versus 90 degree water in the heater and what is going in...the time is quite significant..so your question cant be answered without a few givens..
My question about the time to heat the water in a 20 gallon tank relates to the amount of time needed to run the generator when you are at anchor for several consecutive days. If you are on shore power, or if you are moving and use the main engine to heat water this is a non-issue. My question relates to a boat at anchor for extended periods. Thus the water is already on the boat. Assuming the water in the heater is 75 degrees to match a 70-80 degree outside temperature.
On Bay Pelican we had a 1500 watt, 6 gallon, 110v unit. Took 15 minutes to heat the water. We deliberately switched to a 750 watt element to reduce the draw on the generator when heating water. It now takes 30 minutes of run time.
To explain the draw on the generator when we start the generator (8 kw) we have two 135 amp chargers, the refrigerator, freezer and the water heater on, as well as normal household AC usage. With the 1500 watt unit the total initial draw would drop the generators output frequency (hertz) from 61 to 57 or 56. With the 750 watt unit the hertz drops to 59 or so. Using a 1,500 watt unit I reduced the draw by cutting back on the chargers until the water heater shut off (clear signal from my draw and hertz meters). We also avoided using appliances with significant draw, coffee pot, toaster etc.
If I project the time required for heating the water in a 12 gallon unit by just doubling the time of my six gallon unit it would be 30 minutes at 1500 watts or 60 minutes at 750 watts. Using the same projection the 20 gallon unit would be approximately 1 hour 40 minutes at 750 watts or 50 minutes at 1,500 watts.
Normal nightime generator run time on Bay Pelican is less than 45 minutes. It seems that a larger water heater at anchor would increase the run time. This factor may be important to some cruisers.