Last year’s stock-market surge boosted 401(k) accounts, but millions of Americans are still likely to run short of money in retirement, according to a pair of studies released Thursday.

The average 401(k) balance reached a new record of $89,300 in the fourth quarter, up 15.5 percent from a year earlier, according to mutual-fund giant Fidelity Investments. More than three-quarters of the gain came from rising stock prices.

The rising market helped the average 401(k) balance nearly double from a bear-market trough of $46,200 in March 2009, according to Fidelity.

But Americans’ overall retirement prospects improved only fractionally last year, considering all the factors that affect long-term financial health, according to an analysis by the nonpartisan Employee Benefit Research Institute.

The percentage of “early” baby boomers who will probably not run out of money in retirement improved to 56.7 percent at year-end, according to EBRI.

That was up only a tad from 55.1 percent at the end of 2012.

That implies, of course, that 43.3 percent of early boomers probably will run out of money in their later years.

Early boomers are generally thought of as people in their late 50s or 60s who are at or near retirement age.

The EBRI data paint a similarly dreary outlook for late boomers – people in their late 40s and early-to-middle 50s – and for members of Generation X.

As for the Fidelity data, people age 55 and older have slightly better financial footing than the general population.

Their average 401(k) balance is $165,200.

People who have individual retirement accounts as well as 401(k)s have an average total of $261,400, according to Fidelity.

But in just one sign of the financial stress on Americans in a still uncertain economy, a whopping 35 percent who left their jobs last year cashed out their 401(k)s, according to Fidelity.

And, of course, a 401(k) balance of $89,300 isn’t likely to last too long in retirement, especially for people living in higher-cost areas.