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 hit a record $89,300 in the fourth quarter, up 15.5 percent from a year earlier, according to t Fidelity Investments. More than three-quarters of the gain came from rising stock prices.

The rising market helped the average 401(k) 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 (EBRI).

The percentage of “early” baby boomers who will probably not run out of money in retirement rose to 56.7 percent at year-end, according to EBRI. That edged up from 55.1 percent in 2012.

That implies, of course, that 43.3 percent of people in their late 50s or 60s probably will run out of money later.

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

But in a sign of continuing financial stress, 35 percent who left jobs last year cashed out 401(k)s, Fidelity said.