Financial disaster is looming, and not because of the stock market or subprime loans. The coming crisis is more insidious, structural, and almost certain to blow up eventually.

The World Economic Forum (WEF) predicts that by 2050 the world will face a $400 trillion shortfall (pdf) in retirement savings. (Yes, that’s trillion, with a “T”.) The WEF defines a shortfall as anything less than what’s required to provide 70% of a person’s pre-retirement income via public pensions and private savings.

The US will find itself in the biggest hole, falling $137 trillion short of what’s necessary to fund adequate retirements in 2050. It is followed by China’s $119 trillion shortfall.

Asset returns have been lower than they were in the past and people are living longer, so some of this shortfall is to be expected. The WEF assumes many people born recently will live beyond 100, which may be a bit much (the Social Security Administration expects most Americans born today to live into their mid-80s). But much of the massive shortfall is baked into retirement systems; setups in which nobody, neither individuals nor the government, saves enough. About three-quarters of the projected comes from underfunded promises from governments, with the rest mostly accounted for by under-saving on the part of individuals.

Michael Drexler, head of financial and infrastructure systems at the WEF, who edited of the report, likens the problem to climate change. “Like climate change, you don’t see the consequences today, but if you do nothing the problem builds up and then there is nothing you can do,” he says. “Today you can still change things, but if you do nothing you’ll wind up with a problem that is three to four times the global economy.”

Forecasting anything accurately in 2050 is tricky. We could get lucky, in a sense, and people might start dying younger. More happily, asset returns might pick up. Some argue that worries are unfounded, because we can still pay pensions today and sort out any future problems if they become acute. Others cite uncertainty around the estimates as reason to delay action today. But uncertainty goes both ways—things could be better or worse, and the worst-case scenario poses much bigger costs than we can bear.

Acting sooner ensures lower costs in the future. Putting money aside for retirement now confers the benefit of compound interest and provides certainty to financial markets that fear ballooning government debts. For example the US Social Security Administration estimates that its shortfall could be fixed with an immediate 2.58-percentage-point tax increase, or a 16% cut in benefits. If the government waits until 2034 (the year it can no longer pay full benefits given its current trajectory) it would need a 3.58-percentage-point tax increase, or a 21% benefit cut. If the shortfall proves bigger than expected, the costs of waiting will be larger, too.

The report offers several suggestions to address the shortfall. Most include ways to boost individual saving by offering retirement accounts to a wider population and expanding financial literacy. The authors advocate diversifying investments beyond traditional stocks and bonds. Drexler says that investing in a diversified portfolio of infrastructure projects can increase returns and enhance economic growth.

Financing a long and comfortable retirement requires contributions from multiple sources, as well as shared risk. “If in 2050 people reach 85 and run out of money they’ll need to rely on Social Security,” Drexler explains. “But if there’s a shortfall the government will be overwhelmed by demand or pensioners living in poverty. We must start educating people now, so we have a good [defined-contribution pension] plans so people have something.”

Still, an overwhelming majority of the short-fall comes from government programs. In order to address this problem, governments must adequately and proactively fund their entitlements too, either by increasing taxes or by cutting benefits. Individuals alone cannot save enough to compensate for the unrealistic promises their governments have made.