We hear a lot about the importance of saving for retirement, and it looks like more Americans might finally be listening. In a recent GOBankingRates survey, more of us store our wealth in 401(k)s than any other type of account. Specifically, 28% of adults have most of their money in 401(k)s, compared to 18% who keep their money in a savings account.

Now, on the one hand, this data makes sense. While the typical worker needs anywhere from three to six months' worth of living expenses to be adequately prepared for emergencies, that sort of savings level won't cut it in retirement. Therefore, it's logical for Americans to have more money in their 401(k)s than in the bank.

Savings jar filled with coins


There's just one problem: Most adults aren't close to having fully funded emergency accounts. An estimated 57% of Americans have less than $1,000 in savings, while 39% have no near-term savings at all. (This data, incidentally, comes from the same source as the aforementioned statistics above.)

So why are Americans focusing more on retirement than regular savings? For one thing, 401(k) contributions are pretty seamless -- you tell your employer how much you wish to set aside, and that amount gets automatically deducted from your paycheck, just like that. Putting money into regular savings often takes more willpower and effort, though there is the option to automate the process as with a 401(k). Furthermore, because there's a lot of mystery and trepidation surrounding retirement expenses, some folks may be more inclined to save for the unknown, even if it means letting their immediate savings fall by the wayside.

The problem, however, is that without an adequate level of accessible savings, you run the risk of landing in major credit card debt the moment you're hit with an unplanned expense. And that mistake, in turn, could haunt you all the way into retirement.

You need emergency savings

Make no mistake about it: Saving for retirement is a responsible move, so if you're presently funding a 401(k), that's something to be proud of. That said, your immediate savings should always come first.

Now as I said earlier, a healthy emergency fund is one with three to six months of living expenses. Which end of that range should you stick to? It depends on your circumstances. If you're single and don't own property and work in a mostly thriving industry, then you might choose to settle on three months of savings. On the other hand, if you're the sole earner in a household with several dependents and you own a home, you're safer socking away six months' worth of living costs. The same holds true if your income is variable.

What happens when you don't have a solid emergency fund? It's simple: You risk racking up major credit card debt that may not only cost you money but also compromise your retirement savings goals. Imagine you get hit with a $5,000 home repair bill unexpectedly. If you don't have that kind of money on hand, and instead put it on a credit card charging 20% interest, you'll end up having spent roughly $8,000 if it takes you five years to pay off that balance.

This means two things: First, you'll end up wasting $3,000 on interest, which is money that could've funded your nest egg instead. Second, it means that during that five-year repayment period, you may not get to contribute to a retirement account because all of your spare cash will be going toward your credit card payments.

Now you may be thinking: "If I don't have $5,000 in regular savings but have it in my 401(k), I'll just remove it from there." Big mistake. If you touch that money before age 59 1/2, you'll be hit with a 10% early withdrawal penalty.

A better bet? Amass a decent chunk of near-term savings and then start socking money away for retirement. This way, you'll have an easier time staying out of debt during your working years. Remember, credit card debt can be harder to shake than you'd expect -- so much so that 68% of U.S. adults worry they'll never manage to pay off what they owe in their lifetime. Another option? Fund your retirement account and emergency savings simultaneously. This strategy makes sense if you work for a company that offers a 401(k) match, since you'll earn free money just for contributing.

While saving for retirement is a respectable goal, saving for emergencies should always come first. Follow that rule and you'll be in pretty good shape on the whole.