Bill Pugliano/Getty Images

Until mid-June, there was one ray of hope in Detroit’s gathering storm: For all the city’s problems, its pension fund was in pretty good shape. If the city went under, its thousands of retired clerks, police officers, bus drivers and other workers would still be safe.

Then came bad news. Seemingly out of nowhere, a $3.5 billion hole appeared in Detroit’s pension system, courtesy of calculations by a firm hired by the city’s emergency manager.

Related Links Michigan Governor and Detroit’s Manager Call for Patience

Retirees were shaken. Pension trustees said it must be a trick. The holders of some of Detroit’s bonds realized in shock that if the city filed for bankruptcy — as it finally did on Thursday — their claims would have even more competition for whatever small pot of money is available.

But Detroit’s pension revelation is nothing new to many people who advise pension plans for a living, the math-and-statistics whizzes known as actuaries. For several years, little noticed in the rest of the world, their staid profession has been fighting over how to calculate the value, in today’s dollars, of pensions that will be paid in the future.

It may sound arcane, but the stakes for the country run into the trillions of dollars. Depending on which side ultimately wins the argument, every state, city, county and school district may find out that, like Detroit, it has promised more to its retirees than it ever intended or disclosed. That does not mean all those places will declare bankruptcy, but many have more than likely promised their workers more than they can reasonably expect to deliver.

The problem has nothing to do with the usual padding and pay-to-play scandals that can plague pension funds. Rather, it is the possibility that a fundamental error has for decades been ingrained into actuarial standards of practice so that certain calculations are always done incorrectly. Over time, this mistake, if that is what it is, has worked its way into generally accepted accounting principles, been overlooked by outside auditors and even affected state and municipal credit ratings, although the ratings firms have lately been trying to correct for it.

Since the 1990s, the error has been making pensions look cheaper than they truly are, so if a city really has gone beyond its means, no one can see it.

“When the taxpayers find out, they’re going to be absolutely furious,” said Jeremy Gold, an actuary and economist who for years has called on his profession to correct what he calls “the biases embedded in present actuarial principles.” In 2000, well before the current flurry of pension-related municipal bankruptcies, he wrote his doctoral dissertation on how and why conventional pension calculations run afoul of modern economic principles.

Mr. Gold made his prediction about taxpayer fury in an interview a number of years ago in which he also explained why he had chosen his topic. He said he hoped to help put a stop to the errors he saw his colleagues making before pension problems that were already starting to brew then boiled over and a furious public heaped blame, scorn and legal liability on the profession.

When a lender calculates the value of a mortgage, or a trader sets the price of a bond, each looks at the payments scheduled in the future and translates them into today’s dollars, using a commonplace calculation called discounting. By extension, it might seem that an actuary calculating a city’s pension obligations would look at the scheduled future payments to retirees and discount them to today’s dollars.

But that is not what happens. To calculate a city’s pension liabilities, an actuary instead projects all the contributions the city will probably have to make to the pension fund over time. Many assumptions go into this projection, including an assumption that returns on the investments made by the pension fund will cover most of the plan’s costs. The greater the average annual investment returns, the less the city will presumably have to contribute. Pension plan trustees set the rate of return, usually between 7 percent and 8 percent.

In addition, actuaries “smooth” the numbers, to keep big swings in the financial markets from making the pension contributions gyrate year to year. These methods, actuarial watchdogs say, build a strong bias into the numbers. Not only can they make unsustainable pension plans look fine, they say, but they distort the all-important instructions actuaries give their clients every year on how much money to set aside to pay all benefits in the future.

If the critics are right about that, it means even the cities that diligently follow their actuaries’ instructions, contributing the required amounts each year, are falling behind, and they don’t even know it.

These critics advocate discounting pension liabilities based on a low-risk rate of return, akin to one for a very safe bond.

In the years since his doctoral research, Mr. Gold and like-minded actuaries and economists have been presenting their ideas in professional forums and in scholarly papers crammed with equations and letters of the Greek alphabet. They have won converts, but so far no changes in the actuarial standards. Their theoretical arguments tend to fly over the head of the typical taxpayer.

Year after year there has been consistent resistance from the trustees of public pensions, the actuarial firms that advise them and the unions that represent public workers. The unions suspect hidden agendas, like cutting their benefits. The actuaries say they comply fully with all actuarial standards of practice and pronouncements of the Governmental Accounting Standards Board. When state and local governments go looking for a new pension actuary, they sometimes post ads saying that candidates who favor new ways of calculating liabilities need not apply.

A few years ago, with the debate still raging and cities staggering through the recession, one top professional body, the Society of Actuaries, gathered expert opinion and realized that public pension plans had come to pose the single largest reputational risk to the profession. A Public Plans Reputational Risk Task Force was convened. It held some meetings, but last year, the matter was shifted to a new body, something called the Blue Ribbon Panel, which was composed not of actuaries but public policy figures from a number of disciplines. Panelists include Richard Ravitch, a former lieutenant governor of New York; Bradley Belt, a former executive director of the Pension Benefit Guaranty Corporation; and Robert North, the actuary who shepherds New York City’s five big public pension plans.

This project has drawn fire from a large number of public pension officials. They recently wrote the Society of Actuaries a joint letter, urging it to reconstitute the Blue Ribbon Panel by adding more people “who can provide insight” into the many benefits of the current method, and expressed great concern about switching to a new one that could cause confusion and volatility. Of possible interest to the bondholders and taxpayers of Detroit, they also said that as fiduciaries they were required to “put the interest of all plan participants and beneficiaries above their own interests or those of any third parties.”

Much of the theoretical argument for retaining current methods is based on the belief that states and cities, unlike companies, cannot go out of business. That means public pension systems have an infinite investment horizon and can pull out of down markets if given enough time.

As Detroit has shown, that time can run out.

Monica Davey contributed reporting.