If there were a single savings number that guaranteed financial security in retirement, more of us would no doubt have an easier time mapping out a financial plan. The problem, though, is that fixating on a single number doesn't really work, because the amount of savings you need in retirement will hinge largely on what your expenses look like, and also how you want to spend your days.

For the most part, though, it's fair to assume that a $2 million nest egg will buy you a pretty comfortable retirement. This especially holds true if you're willing to make some lifestyle compromises if need be, like downsizing to a smaller home rather than maintaining a five-bedroom property throughout your senior years.

Now at first glance, the idea of amassing $2 million in your lifetime might seem daunting -- especially if you aren't a particularly high earner. But actually, you may be surprised at how easy it is to accumulate a $2 million 401(k) or IRA -- if you're willing to commit to that goal and stick to it.

A smiling person holding a tablet and a phone.

Image source: Getty Images.

Could you end up with $2 million in savings?

Saving for retirement requires some degree of sacrifice. After all, the money you're socking away in your 401(k) plan or IRA is money you won't have for other purposes. But if you consistently fund one of these plans and invest your money wisely, you may be shocked at how attainable a $2 million nest egg is.

Say you set aside $500 a month in a dedicated savings plan over a 45-year period. If you manage to generate an average annual 8% return in your portfolio, you'll end up with a nest egg worth roughly $2.3 million.

Now you may be thinking, "Sure, but how am I going to generate that sort of return?" And the answer could boil down to investing in the broad market.

The S&P 500 index has delivered an average return of about 10.5% since 1957. That accounts for years when the index did exceptionally well, and also periods during which it underperformed. As such, if you load up on S&P 500 index funds in your retirement plan, there's a good chance you'll manage to generate an average annual 8% return, since that's already a few percentage points below the S&P 500's average.

The great thing about investing your savings in broad market index funds is that it takes the pressure off of you. Rather than risk the run of a specific stock performing poorly, you can instead invest in the general stock market, which has a long history of rewarding investors who stick with it.

A $2 million nest egg could be yours

There's no guarantee that $2 million will help you meet all of your retirement goals, especially if they're lofty. But if you're an average earner and your plans for retirement are reasonably modest -- say, having enough money to maintain a comfortable lifestyle and travel a few times a year -- then chances are, you'll do just fine if you start out with $2 million to your name. And if you commit to that goal ahead of time and rely on the power of the broad market, you may be pleasantly surprised at how much wealth you're able to accrue.