Note that the calculations are highly dependent on regional energy costs. Where I live, electricity is $.177/kWh and gas is $1.366/Therm. So, that translates into: 58.4 cents for electric 33.8 cents for gas
Now, per one of the consumer sites, a gas dryer typically costs an extra $50. (Also installation costs may vary depending on whether you already have gas or 220v available etc.).
So for me the payback would be about 200 loads which is probably about year or so in our family.
In truth, when we added a new 1st floor laundry room, we put in a gas dryer but we left the old electric dryer (and washer) still hooked up in the basement. We now end up using both simultaneously to speeed up laundry time.
During the winter, we have started venting our electric dryer inside the basement (with a lint trap) so that we recapture the heat. The moisture is actually beneficial since during the winter the basement humidity is around 27%. We always vent the gas dryer outside for safety reasons. Also, it's one thing to dump a little moisture and laundry smell in an unfinished basement but we don't want to do that on our finished first floor.
So, during the winter, it may be arguable more efficient to use the electric dryer since we end up recapturing all of the heat in the basement which presumably displaces some heating load from our furnaces.