Many people with substantial resources fail to set up an emergency fund. They figure that if something unexpected happens, like damage to their home, unexpected medical expenses or even a job loss, they’ll dip into their investments or retirement accounts or use their credit cards.

However, investments should be part of your long-term savings strategy — not something to raid if you need some extra cash. Withdrawals from retirement accounts can come with costly tax penalties. Putting significant expenditures on a credit card (unless you’re able to pay off the balance) will end of costing you money in interest and potentially late fees.

Your emergency fund should be in an instrument that’s easily accessible without penalty like a money market or savings account. You won’t earn much interest on the money, but it will be there when you need it. Further, it won’t be subject to the vicissitudes of the stock market like investment accounts are. Your emergency fund should be separate from your long-term savings so that an unexpected calamity doesn’t damage your long-term or even intermediate-term financial goals.

Financial experts recommend setting aside money to cover your expenses for anywhere from three to six months. Determine how much you would need for the following:

— Food and housing– Insurance payments– Health care– Transportation– Taxes– Job search costs

Obviously, not everyone can afford to put aside that kind of money. Many Americans live paycheck to paycheck. While you might not be able to put away enough money to hold you over for six months, with careful budgeting, you can put a little aside each paycheck. Some companies will automatically deposit a specified portion of your income automatically to a savings account, so pretty soon, you don’t even miss it. The popular adage “Pay yourself first” is an important one to remember when it comes to developing a budget.

If you’re too mired in debt to even be able to consider having an emergency fund, it may be time to seek legal and/or financial guidance to help you get out from under it and get a fresh start.

Source: TD Ameritrade, “Financial Planning 101: Emergency Funds (Pay Yourself First),” Dan Rosenberg, Dec. 08, 2016