Some Americans are slightly better prepared for retirement thanks to automatic enrollment in 401(k)s, but you have to be a diehard optimist to seize on that. Most of the data in a new report on Americans’ retirement prospects is pretty gloomy, underscoring the need for many people to tighten their belts and stay in the workforce longer.

The study by nonprofit Employee Benefit Research Institute finds that nearly half of the first wave of baby boomers is at risk of not having enough money for basic expenses in retirement.

The prospects are almost as bad for younger boomers. And about 70% of people in the lowest third of the population, measured by income, are likely to fall short.

But EBRI says there’s actually been some improvement since its first survey in 2003, when almost 60% of early boomers were “at risk.” The report credits the federal Pension Protection Act of 2006, which made it easier for employers to automatically enroll new workers in 401(k)s.

Employees still have the right to “opt out” of the plans, and to change their investment options, but studies have shown the typical participant takes the path of least resistance, staying in the plan if automatically enrolled.

EBRI found that people who are eligible for workplace retirement plans have far better prospects than those who don’t. Among those in Generation X, born between 1961 and 1981, about 60% of those without workplace plans are at risk of running short, compared to 20% for those with at least 20 years of plan eligibility ahead of them.

To catch up, most people will have to boost savings, setting aside between 10% and 25% more of their incomes than they are now, EBRI said. That’s a daunting task for many.

But EBRI assumed retirement would begin at age 65. Many people can improve their prospects by working longer. That reduces the number of retirement years one needs to fund, adds to the years during which new savings can be set aside and increases the time for investments to compound.

That triple whammy can have dramatic effects.  A 45-year-old with $100,000 invested who puts aside $5,000 a year could have after-tax income of $1,940 a month, according to the Retirement Income Calculator. That assumes retirement at age 65, with an 8% investment return before retirement and 6% afterward. The income is also adjusted for inflation, so that retirement income will increase every year to continue buying what $1,940 a month buys today.

Change the retirement age to 70 and the monthly income jumps by about 25%, to $2,521. If the investor increased savings by $250 a month, retirement income would rise to nearly $3,100 a month.

Of course, one can also hope to get lucky, with investments returning more than 8% or inflation averaging less than the 3% it has in the past. But it would be pretty risky to count on superstar returns and miniscule price increases. For most people, the prudent strategy would rely on tighter budgeting and a later retirement.

—For the best rates on loans, bank accounts and credit cards, enter your ZIP code at