The United States received 31 percent of its electricity from carbon-free sources of energy last year. By 2040, the Energy Department just estimated, that number will increase to . . . 32 percent.

The first number is higher than you expected because nuclear power plants produced 19 percent of the country’s electricity in 2012. The second number is lower than you expected in part because the government estimates that nuclear’s share will fall to 16 percent by mid century. So, even as renewables such as wind and solar advance from 12 percent in 2012 to 16 percent in 2040, their 4 percent gain just barely makes up for nuclear’s 3 percent fall. Even if the estimate is too bearish on renewables, nuclear’s performance offsets their progress.

(Energy Information Administration)

Not typically thought of as “clean,” the country’s nuclear plants nevertheless produce vast amounts of electricity with practically no greenhouse gas emissions. But some are already beginning to retire. That’s partially a result of age — built in a spurt around a half-century ago, they were designed to operate for 60 years. It’s also a result of economics. Abundant new supplies of natural gas make that fossil fuel look a lot cheaper to utilities than other electricity-generation technologies.

For a while, cheap gas’s rise won’t be a bad thing. Replacing carbon-packed coal with cleaner gas has already resulted in net greenhouse emissions reductions, and at a rock-bottom price. But burning gas still produces about half the carbon dioxide as burning coal. In the long term, the country will have to expand its use of much cleaner technologies if it is to wean itself off carbon dioxide. That probably means renewables will have to advance further than the Energy Department reckons they will, nuclear will have to hold on to or expand its current share of the market, or both.

Some environmentalists cheer the closing of nuclear plants, even though it makes the anti-carbon effort tougher, and they argue that the country should put all of the planet’s eggs into the renewables basket. The pro-nuclear crowd predicts that a new wave of innovative technologies will make constructing new nuclear plants much more attractive, technically and economically.

The country — and particularly environmentalists — should hope the pro-nuclear side is right; a renaissance in nuclear technology could offer the country a source of reliable, carbon-free electricity with safer designs than those of decades ago, all of which would be particularly helpful if renewables never burst out of their niche end of the market.

At the least, utilities, regulators and the public should be open to keeping the nuclear plants the country already has, which represent billions in capital investment, for as long as they can be safely operated. A new report from the American Physical Society finds that many of the plants scheduled for closure in coming years could have another 20 years added to their operating life as long as regulators allow it and maintenance remains vigilant.

Even that won’t be easy in the face of competition with cheap natural gas. To change the Energy Department’s picture, Congress will also have to discourage greenhouse emissions with more care and ambition. An appropriately high carbon tax would nudge the market toward cost-effective low-carbon technologies. That could help nuclear survive — or reward something better.

Stephen Stromberg is a Post editorial writer. He specializes in domestic policy, including energy, the environment, legal affairs and public health.