DES MOINES, Iowa — Americans who were afraid to open their 401(k) statements during the recession are finding good news inside the envelope now: For the most part, their accounts have come all the way back and then some.

Nine in 10 of the popular retirement plans are at least back to where they were in October 2007, the peak of the stock market. Since the bull market began in March 2009, stocks have almost doubled.

And many investors who kept their nerve and continued putting some of their paycheck into a 401(k) during the market’s worst months are now ahead.

Account balances didn’t recover entirely from the strength of the market. Those automatic paycheck deductions helped a lot.

On average, 401(k) participants put in about 8 percent of their pay from 2003 to 2006, says business consulting firm Aon Hewitt. Contributions slipped slightly during the recession, falling from an average 7.7 percent in 2007, to the current average around 7.3 percent.

Advisers typically recommend setting aside from 11 percent to 15 percent of your salary to enable you to live comfortably in retirement, and ensure you save enough to last for decades.

A 401(k) plan allows employees to deposit part of their salary into an account and not pay income tax on the money until it’s later withdrawn in retirement. Employers may also match a certain portion of a worker’s contributions.

An Associated Press analysis of 401(k) balance data provided by the nonpartisan Employee Benefit Research Institute in Washington, D.C., shows the youngest workers with the shortest time on the job saw the most significant recovery.

If the stock market has declined, says Jack VanDerhei, EBRI’s research director, it’s almost always true that workers with fewer years on the job are going to recover more quickly. That’s because they can make up losses more readily by continuing their payroll deductions. The money they’ve contributed since 2009 makes up a larger portion of their total account balance.

A snapshot of the findings:

1 to 4 years on the job: The youngest workers, with the smallest savings, saw their balances rise by more than 50 percent since 2007. Average account balances range from $18,000 for the youngest workers to $39,000 for the older members of this group.

5 to 9 years on the job: These workers’ 401(k) balances are generally 2 percent to 4 percent higher than in 2007. Depending on age, average account balances range from $36,000 to $70,000.

10 to 29 years on the job: Workers at this level of seniority still haven’t recovered their losses since 2007. Their balances on March 1 were 5 percent to 8 percent lower than at the market’s peak. Average account balances range from $44,000 for the youngest workers to $187,000 for the oldest.

30-plus years on the job: This group has only recently moved into positive territory. Their accounts are up roughly 1 percent. Average account balances range from $175,000 for those age 46 to 55, to nearly $217,000 for those age 56 to 65. Their gains are likely due to more conservative asset allocations. Having a smaller portion of their accounts in stocks as they approach retirement age would have limited their losses in the downturn.