One of the most asked (and most important) questions in energy has no simple answer: What's the future of coal-fired power in the United States?

On one hand, recent history hasn't been very favorable to coal. A little over a decade ago, coal-fired power plants produced more than half of the electricity in the United States. An unprecedented rate of plant retirements cut that share to just 30.1% in 2017.

On the other hand, most of the coal plants shuttered in the last decade were smaller and older -- and some were only used intermittently to begin with. It could prove more difficult to jettison newer, larger power plants from the American grid -- which is a large factor in the U.S. Energy Information Administration's forecast that coal could still generate as much as 22% of the country's electricity in 2050.

However, that number doesn't seem quite right based on the planned pace of coal plant retirements by America's largest utilities and power generators. In fact, it's possible the United States may close most of its coal-fired power plants by 2040. Here's why.

American utilities aren't fond of coal

The EIA Annual Energy Outlook 2018 made headlines when it was released. That's because the report's reference case projects coal's share of the power mix could be as high as 22% in 2050. That assumes the federally mandated Clean Power Plan is not enforced, that virtually no retirements occur after 2030, and that economics favor coal over natural gas.

Even in the projected scenario in which natural gas prices remain low, the EIA estimates coal will generate 14% of America's electricity at mid-century. By comparison, Bloomberg New Energy Finance estimates coal will fall to 14% of the nations' generation mix by 2040, a full decade earlier.

Both numbers could be too optimistic for coal's future. A survey of the 16 largest utilities and power generators -- which among them own half of the country's installed power capacity -- doesn't bode very well for coal. Seven companies on that list have announced ambitious plans to invest billions in renewable energy and retire a significant portion -- or all -- of their coal plants in the coming decades.

Company/Organization Coal as Share of Power Mix, Current Coal as Share of Power Mix, Future U.S. EIA, reference case 30.3% (nationally) 22% in 2050 (nationally) U.S. EIA, low-priced natural gas case 30.3% (nationally) 14% in 2050 (nationally) Bloomberg New Energy Finance, 2017 30.3% (nationally) 14% in 2040 (nationally) Duke Energy (NYSE:DUK) 33% 16% in 2030 Southern Company (NYSE:SO) 28% 0% in 2050 Tennessee Valley Authority 26% 22% in 2027 Dominion 26.5% Retiring 4.3 gigawatts of coal by 2025 FirstEnergy 54% Retiring over 3 gigawatts of coal in next three years PPL Corp (NYSE:PPL) 85% 10% in 2050 Xcel Energy 37% 22% in 2027

Of the remaining nine in the top 16 power producers, four -- NextEra Energy (NYSE:NEE), Exelon, Calpine, and the U.S. Army Corps of Engineers -- don't operate any coal-fired power plants today. The last five -- NRG Energy (27% coal), American Electric Power (47% coal), MidAmerican Energy (30% coal), Entergy (9.3% coal), and Talen (34% coal) -- have not publicly revealed their long-term plans, although some have taken part in coal's ongoing retirement party.

The companies that have announced that they are transitioning away from coal have all sounded the same alarm bells during their retreat: Coal is not competitive in the marketplace today -- even before considering the effect of regulations. And although the Obama administration's Clean Power Plan appears to be finished under Trump, the federal government is still legally obligated to regulate carbon dioxide as a pollutant, which explains why the largest power producers have said they'd rather not be caught unprepared if a more aggressive climate-change policy gets handed down by a future administration.

Consider several highlights from the power mix plans of America's largest utilities:

Duke Energy will retire more than 2 gigawatts of coal by 2024 (they're announced, but not scheduled, which means they don't show up in EIA data yet). It will also invest $11 billion in new natural gas, wind, and solar; and $25 billion by 2026 in energy efficiency programs aimed at saving the equivalent of 0.5% of total U.S. electricity consumption.

Southern Company, one of the nation's largest owners of coal power plants and the third-largest power generator, has pledged to have "low- or no-carbon emissions" by 2050. It will no longer invest in its existing coal-fired power plants aside from maintenance, and is furiously switching to natural gas.

Dominion Energy expects to reduce its carbon emissions per customer 46% by 2027 compared to 2007 levels. It's accomplishing that by investing in solar and natural gas, retiring coal-fired power plants, and even switching some coal facilities to burn biomass instead.

PPL Corp. released a climate report at the end of 2017, a stunning move for a power generator that relies on coal for 85% of its power mix. The company concluded its future was at a severe risk, and so decided to reduce carbon emissions by 45% to 90% by 2050, leaving as little as 10% of its power mix tied to coal by mid-century.

Analyzing the plans of the largest electricity producers paints a pretty bleak picture for the future of coal-fired power plants in the United States. So does some oversimplified math: Most coal-fired power plants were built before 1990 (representing 88% of all operating coal capacity), and most have a lifespan of about 50 years. Considering that coal facilities will likely never be built again in the U.S., the power source could be nearly extinct in the United States by 2040 barring some extraordinary interventions.

While there's some chance that such an intervention could come in the form of the U.S. Department of Energy freezing coal (and nuclear) plant retirements for a two-year period, it's not likely to occur. That's because the industry argues that retiring older assets is a normal and healthy process, state regulators have already rejected similar heavy-handed proposals, and the legality of using during peacetime a power that was granted to the federal government specifically for times of war is not exactly airtight.

Rather, the suggestion that the government intervening in markets to keep coal alive was made by FirstEnergy as it was desperately attempting to stave off bankruptcy for its subsidiaries, which was ironically caused by the fact they have collectively remained one of the last major nonregulated utilities in the country. In other words, the company lost out to competitive markets -- just like coal.

The market has spoken

Despite the EIA's relatively rosy projection for coal power in the United States through 2050, historical data and changing generation portfolios from the largest American utilities indicate that the baseline forecast that coal could provide 22% of the nation's power mix then is way, way off. Even its most aggressive 2050 projection -- 14% if natural gas prices stay low -- seems too optimistic for coal, especially considering that some of the youngest coal-fired power plants would be nearly 70 years old by then.

That provides a handful of takeaways for long-term-minded energy investors. First among them: Most utilities are moving as quickly as realistically possible to retire coal and build wind and solar infrastructure. As renewables (and natural gas) become cheaper than coal across the board, generation mix could soon be a big differentiator among utilities stocks. Those with higher percentages of coal could see higher operating costs, less cash flow, and be more exposed to future regulatory risks. In other words, the most aggressive of the bunch -- such as NextEra Energy and Duke Energy -- are good places for investors to start. The ones that have not publicly declared a low-carbon strategy might be riskier than they seem.

Second, the coal industry is probably one to keep your portfolio away from. Most domestic production goes to domestic power plants, but an avalanche of retirements will shrink the market in a relatively short time frame. And third, this is just the latest reminder not to underestimate the fast rise of renewable energy.