Figuring out how much you need to save for a retirement that can last 20 years or more is difficult.

Only 41 percent of workers and their spouses have ever tried to calculate how much money they should be saving so that they can live comfortably in their golden years, according to the latest retirement confidence survey by the Employee Benefit Research Institute. Among the 782 workers out of the 1,082 surveyed who calculated their retirement savings goal, nearly two-thirds said that they would require a nest egg of less than $1 million. (See chart below.)

"For younger workers, $1 million may not be enough," said Bob Gavlak, a certified financial planner and wealth advisor with Strategic Wealth Partners in Columbus, Ohio.

Here's why: Millennial and Generation X earners have less access to traditional pension plans than baby boomers do (and, therefore, a greater chance of running out of money in retirement), and Social Security may provide fewer benefits in the future, Gavlak said. As incomes rise, so do retirement expectations. Half of households that make at least $75,000 annually want to have a $1 million in savings before they retire, the survey found, compared to 17 percent of those with incomes under $35,000. More from Balancing Priorities:

Today's retirees are just not the retiring types

This dangerous mistake will ruin your retirement strategy

Don't let this runaway expense ruin your plans for retirement

You can figure out how much you need in retirement on your own by using an income replacement rate based on your current income. Many financial advisors recommend an 80 percent replacement rate. That means if you make $100,000 annually, you will need a portfolio that generates $80,000 in income each year plus annual increases to adjust for inflation. Fidelity Investments has an easy rule to build a nest egg that can last: You should aim to have 10 times your final salary in savings.