Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

Katie Edwards—Getty Images/Ikon Images

Unsure about how much you're shelling out in fees in your retirement accounts? You're not alone.

A recent TD Ameritrade survey of 1,000 investors found that only 27% knew how much they were paying in their 401(k)s and nearly 60% either didn't know if their plan levied fees or mistakenly believed they weren't being charged anything.

Of course, given the recent turmoil in the stock market, fees may be the last thing on your mind. But over the long term the amount you pay in expenses can play a big role in determining the eventual size of your nest egg as well as how much income you can draw from it after you retire.

This is why it's important to understand how too-onerous expenses can undermine your retirement prospects.

How Fees Diminish Your 401(k)

On the face of it, gauging the effect of investing expenses seems straightforward.

The fees you pay are deducted from your investment accounts, effectively reducing your net return.

But when you're investing over the course of many years — as is the case with your retirement savings — the impact that expenses can have on your nest egg and, by extension, your retirement security, goes beyond the amount you pay for the fees themselves.

To illustrate how and why that's the case, let's take a look at a hypothetical example. Call it the Tale of Two Retirement Accounts: Two investors each have a starting balance of $100,000 and earn 6% a year before expenses. But one pays investing fees equal to 1% of assets a year, while the other pays just 0.25%.

At first glance, that difference in annual costs may not seem like anything to get too worked up about.

The first year the higher-fee account pays 1%, or $1,000, in fees, which reduces its net return to 5%, leaving it with an end-of-year balance of $105,000.

Investment expenses for the lower-cost account amount to $250 the first year, resulting in a net return of 5.75% and a balance of $105,750. (For simplicity's sake in this example, we're ignoring taxes and assuming investment fees are calculated based on the starting account balance for each year and deducted at the end of the year.)

Clearly, the lower-cost account has earned a higher return and has a larger balance. But the difference in account values isn't exactly earth-shattering.

Over time, however, the difference between the account balances grows substantially.

The reason that happens isn't just because of the drag of the annual fees themselves, even though they do get larger each year as the accounts grow in value. Rather, there's also the issue of the "opportunity cost" associated with higher fees, or the gains you miss out on because money that went to loftier expenses is no longer invested in your account.

For example, assuming fees of 1% and 0.25% respectively and a 6% return before expenses as outlined above, the $100,000 balance of the higher-cost account would grow to roughly $163,000 in 10 years, which is $12,000 less than the $175,000 balance in the lower-fee account.

The bulk of that $12,000 difference, or about 80% of it, is because the higher-cost account paid $9,300 more in fees over the course of 10 years. But 20% of the difference in account values, or about $2,700, is due to the investment gains that were lost because the $9,300 that went to expenses was no longer in the account to compound investment returns over the years.

After 20 years, the higher-cost account falls behind by an even larger margin, about $41,000 (a balance of roughly $265,000 vs. $306,000 for the lower-cost account). Again, the main reason the higher-cost account lags is because it shelled out $24,000 more in fees, except this time, the portion of that difference to forgone investment gains totals nearly $17,000, accounting for 40% of the difference in account values.

Look what happens by the end of 30 years, though.

The difference between the two accounts swells even more with the higher-cost account's balance now trailing its lower-cost counterpart's by about $103,000 ($432,000 vs. $535,000, or two and a half times the margin after 20 years).

This time the lost compounding of gains on fees ($55,000) accounts for 55% of the $103,000 gap in account values, while the fees themselves ($48,000 over the 30 years) are responsible for less than half of that gap.

The Longer You Have, the More Fees Matter

Notice the pattern here?

The longer your money remains invested in high-fee investments, the more it's the lost compounding of returns rather than the fees themselves that drag down the eventual value of your account.

Or, viewed another way, by avoiding high fees, more of your money remains in your account, allowing that extra dough to compound in value and boost your account balance over the years.

The point, though, is that when you're investing for long-term goals like retirement, the real culprit isn't the amount you pay in fees but what you give up in investment gains because less of your money is working for you.

Fortunately, there's a relatively simple way to avoid having your nest egg sandbagged by high expenses—namely, invest to the extent that you can in investments that have modest annual costs. That's pretty easy to do these days, given the proliferation of low-cost index funds, ETFs, and even reasonably priced actively managed funds (examples of which you can find in the Money 50 list of the best mutual funds).

Granted, when you're investing in a 401(k) or similar workplace retirement plan, your choice of low-cost options could be somewhat limited. Still, you want to hold down expenses the best you can given the choices you have. You can compare fees on the investment options in your 401(k) (and get info on administrative and other plan fees) by checking out the annual disclosure the Department of Labor requires plan sponsors provide plan participants. Many companies also provide fee information on their 401(k)'s website.

That said, there's no guarantee that limiting yourself to less expensive investments will bulk up the size of your nest egg. It's possible that a higher-cost investment might earn its keep by generating higher returns.

But that's not likely to happen consistently over the long term unless the more expensive option is taking on more risk. And in fact, this Morningstar study shows that fees are a good predictor of how well a fund will perform and that funds with lower costs tend to do better than their higher-cost peers.

Remember too, though, that as important as holding the line on expenses is, you don't want to home in on fees so relentlessly that you overlook other crucial elements of planning for retirement. You want to be sure you're creating a portfolio of investments that's truly diversified, that jibes with your tolerance for risk, and that's tax-efficient.

And you don't want to lose sight of the fact that decisions such as how much you save, when you decide to take Social Security, and how much you withdraw from your nest egg after you retire can have an even larger impact on your retirement security than the cost of the investments you choose.

Walter Updegrave is the editor of If you have a question you would like Walter to answer online, send it to him at Follow Walter on Twitter at @RealDealRetire.

More From How Would Your Retirement Plans Stand Up To A Market Meltdown?