Image: 401k © Tom Grill, Corbis

A combination of investment gains and worker contributions helped push the average amount stashed in a 401k to its highest level ever by the end of 2012, according to the latest Fidelity Investments analysis of the retirement savings plans it manages.

But the average, while 12% higher than a year earlier, totals just $77,300, according to Fidelity's data, which covers 12 million participants. That is a fairly dismal sign that there are some difficult retirement years ahead for many savers.

Still, that overall average balance counts savers young and old, so presumably many of those people have years of contributions ahead of them.

Meanwhile, for workers aged 55 and over, the average balance is $143,300. Not so great, but these savers may have other workplace plans or IRAs not covered by Fidelity's data.

The numbers look a bit better for workers 55 and over who have contributed to the same plan without interruption for 10 years: Their average account balance is $243,800.

For a growing portion of people, their retirement plan is to work longer. A separate study found that 62% of workers aged 45 to 60 plan to delay retirement. That's up from 42% in 2010, according to a survey of 15,000 people by the Conference Board, a nonprofit business-research organization.

Savings rates rise with age

Not surprisingly, older workers manage to set more aside each paycheck than their younger co-workers do.

Among older workers, 401k contribution rates averaged 11.4% for workers aged 65 to 69, 10.6% for those aged 60 to 64, and 10% for those aged 55 to 59. If you add in the employer match, the average savings rate for each of those groups was 14.9%, 14.2% and 13.6%, respectively, according to Fidelity.

Contribution rates are substantially lower among younger savers. Workers aged 20 to 24 saved 5.4% of their salary on average, those aged 25 to 29 saved 5.9%, and those aged 30 to 34 saved 6.5%. With the employer match included, those figures jumped to 8.1%, 9.1% and 9.7%.

Workers aged 35 to 39 saved 7.2% on average (10.4% with the employer match). Those aged 40 to 44 saved 7.6% (10.9% with the match). Those aged 45 to 49 saved 8% on average (11.4% with the match). Those aged 50 to 54 saved 9.2% on average (12.7% with match).

Young savers embrace Roth 401k's

Thirty-seven percent of the workplace plans studied by Fidelity offer a Roth 401k option, up from 12% five years ago.

Among workers who have access to a Roth, savers in their 20s are likelier to use the option, Fidelity said. Ten percent of 20-something plan participants contribute to a Roth 401k, versus 6% of plan participants overall.

Workers who tap a Roth 401k tend to have higher savings rates, putting aside 11% on average (15.3% with employer contributions), versus an 8% average for workers overall (12% with employer share added).

"You get some people who are more predisposed to saving," said Beth McHugh, vice president of market insights at Fidelity. "Those are the individuals that we repeatedly see they will take advantage of any and all opportunities for saving."

Click here to become a fan of MSN Money on Facebook

When plan participants call Fidelity for advice, those who ask about Roth 401k's "are often a bit more engaged," McHugh added. "They want to not only take advantage of all the savings opportunities; they want to save in the smartest way possible. They say, 'Let me look not only at my asset allocation but also my tax diversification. How is the way I'm saving today going to impact me tomorrow?'"

Also, 59% of people who contribute to a Roth stash tax-deferred money into their regular 401k as well, according to the Fidelity data.

More from MarketWatch: