In retirement, you'll need savings to supplement Social Security. This is important to maintain a reasonable standard of living, as Social Security benefits are only designed to replace around 40% of pre-retirement income. And the savings you have will not only need to produce income, but will also need to last for the rest of your life.

So how much do you really need so your savings stands up to the test? A recent survey conducted by Schwab found 401(k) participants believe they'll need around $1.7 million on average.

How much income would $1.7 million produce for you?

To determine if a retirement nest egg of $1.7 million is sufficient, think about how much income this would provide you with as a senior. The answer depends on your withdrawal rate, or the amount of money you take out of your retirement accounts each year.

Experts used to advise that you could withdraw 4% in your first year of retirement and increase withdrawals each year to keep pace with inflation. If you had $1.7 million saved and took 4% out, you'd have an income of $68,000 from your savings. When added to Social Security, this would almost assuredly produce enough money to live on for all but the most extravagant of retirees.

Retirement
In the image, a couple walk along the beach at Coney Island on a warm autumn day in New York City, Oct. 19, 2016. Spencer Platt/Getty Images

But this is assuming that you're retiring today with $1.7 million. If you retire in 30 years with $1.7 million, the inflation-adjusted value is about $681,829.

If you follow the 4% rule, you'd have the equivalent of about $27,000 of today's dollars to spend each year, assuming a 3% inflation rate. The average Social Security benefit in 2020 provides about $18,000 in income.

So if you receive the average and assume Social Security just keeps pace with inflation with no other changes, you'd have the equivalent of about $45,000 in total buying power if you retired with a $1.7 million nest egg 30 years from now.

This may not be enough, as mean expenditures for Americans 65 and over were close to $51,000 in 2018, according to the Bureau of Labor Statistics. And your shortfall might be even greater, because the 4% rule is now seen as outdated -- retirees are generally advised to choose a lower withdrawal rate to reduce the risk of running out of money too early.

How much do you really need to retire?

If $1.7 million is enough for some people but not for others, how much do you need to retire?

The answer depends on your individual situation, including how far you are from retirement, what your income is, and how much of your income you want to replace after leaving the workforce.

There are a few different ways to calculate how much you'll need to support yourself in retirement. One of the easiest is to assume you'll need 10 times your final salary. In doing this calculation, take your current salary, assume a 2% raise each year, and figure out what your salary will be when you're ready to retire. Then multiply this amount by 10.

You may find $1.7 million is too much, or you may discover you need more than the average American thinks they'll require. The key is to do the calculations so you know what your number is, and can set the right savings goal for you.

Figure out your retirement number ASAP

You don't want to get to retirement and discover you've saved too little. So take the time today to figure out what you should save for the future, and to set your retirement savings goal.

When you've got a big nest egg and don't have to worry about running out of cash as a retiree, you'll be glad you did.

The Motley Fool has a disclosure policy.

This article originally appeared in The Motley Fool.