NEW YORK (MainStreet) – If you have to ask what an emergency fund is, chances are you don't have one that can cover you.

The recession and ensuing stretches of unemployment for many workers showed the value of an emergency fund, even if many Americans couldn't build one. Post-recession, an emergency fund is an even better idea, but there's still a question of how much should be in it and how to fund it.

”A good rule of thumb is to have an emergency fund that covers at least six months of expenses," says Anthony D. Criscuolo, certified financial planner with Palisades Hudson Financial Group in Fort Lauderdale, Fla. “If you are older and/or have dependents, you may want to be even more conservative and build up 12 months of expenses.”

According to Bankrate, 58% of Americans have more emergency savings than credit card debt. That's up from 51% last year and 55% in 2013, but doesn't tell the whole story. Conversely, 24% of Americans have more credit card debt than emergency savings and another 13% have neither credit card debt nor emergency savings.

“These numbers mean that three out of every eight Americans are teetering on the edge of financial disaster,” said Greg McBride, CFA, Bankrate.com’s chief financial analyst. “People between the ages of 30 and 49 are in the worst shape, probably because of the expenses associated with raising children and paying a mortgage.”

So how do you get that emergency fund in order if you're starting from zero? First, Criscuolo says, make it a priority over other long-term savings. Anything beyond a company 401(k) plan with matching contributions (“free money”) should move to the back of the line, especially if you're worried about job security or work in an unstable industry. Secondly, according to Credit Union National Association spokeswoman and counselor Susan Tiffany, you should focus on setting a savings goal. Sock some cash away and keep it where it can grow and you can still get to it.

”Ideally, across all categories, short or medium term, if you're doing well you should be shooting for 10% of your after-tax income going toward your savings commitment,” Tiffany says. “An emergency fund should always be liquid. Remember "SLY": savings, liquidity, yield, in that order of priority.”

As Criscuolo points out, even a safe growth investment such as a two-year CD isn't going to do you much good if something comes up during that term and you're stuck with early surrender charges. In truth, he says, you should avoid anything with a maturity greater than three months. He advises keeping at least some of the emergency fund in cash or money-market funds.

The yield is low, but the purpose of an emergency fund is not to generate income or have a good rate of return, it’s to protect you and provide cash in the event of an emergency,” Criscuolo says.

If that ends up not being enough, Criscuolo advises keeping an emergency line of credit as an absolute last resort. Yes, the emergency fund is ideally supposed to keep you from going into debt in the first place, but genuine emergencies seldom come with fixed price tags.

“It may be too late to apply for a credit card with no income and no assets, so having one or two backup lines of credit in place before an emergency is a good idea,” he says. “The best options are usually a credit card with no annual fee or a home equity line of credit.”

If you really want to avoid debt, though, it pays to make an emergency budget in advance. If you already have a standard budget with all your normal income and expenses, scan it for non-essential expenses that can be cut or reduced in an emergency: items such as cable, streaming services and the like. That doesn't mean you your emergency fund should contain less than your standard six- to 12-month budget; that fund will just last a bit longer if you get a bit more conservative.

Finally, don't get lulled by better times. As Bankrate points out, 24% of Americans feel more secure in their jobs than they did a year ago, twice as many as the 12% who feel less secure. People are feeling better about their net worth by a similar margin and are more upbeat about their debt than at any point since June 2013. Even the percentage of Americans less comfortable with their savings, which usually outnumbers those who are more comfortable by a 2-to-1 ratio, has shrunk a bit. Roughly 28% are less comfortable with their savings now, compared with February 2014, while 22% are more comfortable.

This may lead you to believe you can just dip into that emergency fund for other things now and pay it back later. That's a recipe for absolute disaster.

“A weekend trip with your friends is not an emergency, “ Criscuolo says. “You never know when an emergency will occur or how severe it may be. If an emergency hits right after you used some of the money, you may never be able to replenish the account, and what’s left may not be enough to last through the length of the emergency.”

— Written by Jason Notte for MainStreet

To follow the writer on Twitter, go to http://twitter.com/notteham.

This article is commentary by an independent contributor. At the time of publication, the author held TK positions in the stocks mentioned.

More from Debt Management

How to Cancel Your Credit Card in 6 Steps

How to Cancel Your Credit Card in 6 Steps

What Are the Different Types of Interest and Why Do They Matter?

What Are the Different Types of Interest and Why Do They Matter?

Debt Service Coverage Ratio: Definition, How to Calculate and Examples

Debt Service Coverage Ratio: Definition, How to Calculate and Examples

How to Calculate Interest on a Loan: Amortized, Credit Cards and More

How to Calculate Interest on a Loan: Amortized, Credit Cards and More

What Are Credit Card Scams and Why Do They Matter in 2019?

What Are Credit Card Scams and Why Do They Matter in 2019?