The emotional stress and financial chaos caused by the government shutdown illustrates a widespread problem: Despite a robust economy, many Americans are living paycheck-to-paycheck with no financial safety net to deal with unexpected expenses or sudden loss of income.

Only 40 percent of U.S. adults say they can pay an unexpected expense of $1,000 or more, according to a survey by Bankrate.com.

“It’s a reminder that we need to try to plan for the unexpected,” said Mark Hamrick, Bankrate’s chief economic analyst. “It’s critically important for those who are walking a financial tightrope to be prepared for the inevitable, whether it’s an emergency car repair, something health-related or as in this case, a loss of income.”

A survey taken during the last week of the shutdown by NerdWallet, a personal finance website, found that:

62 percent of employed Americans couldn't cover basic expenses for more than three months, if they were unexpectedly told they would not be receiving another paycheck indefinitely.

36 percent of employed Americans couldn't cover basic expenses for more than one month, if they unexpectedly were told they would not be receiving another paycheck indefinitely.

Nearly half (45 percent) of employed millennials couldn't cover basic expenses for more than one month.

EVERYONE NEEDS A RAINY-DAY FUND

“Most people depend on their paychecks in order to pay their bills, and if their paychecks suddenly go away, it creates a big financial strain,” said NerdWallet’s Kimberly Palmer.

Financial experts recommend having a “rainy day” savings fund that could keep you going for three to six months without a paycheck. Admittedly, that’s quite a nut to crack.

“It’s definitely not easy for most people to create an emergency fund,” Palmer said. “It does take serious restraint and cutbacks, and it not something that’s enjoyable, but it’s essential, so you have something to fall back on in case there’s a big unexpected expense or your paycheck suddenly disappears.”

FIRST, YOU NEED A PLAN

Families with a household budget are better prepared to handle an unexpected financial challenge without going into debt.

You don’t need a big, fancy spread-sheet, just keep track of where the money is going and how it meets your monthly and annual spending plans. Savings should be included in your budget.

NerdWallet recommends creating a budget that follows the 50/30/20 rule:

Get the better newsletter. This site is protected by recaptcha

50 percent of your take home pay covers your needs: such as food, shelter, utilities, transportation and medical

30 percent goes towards wants: such as entertainment, dining out or travel

20 percent is earmarked for savings

If you can’t find money in your budget for savings, you’ll need to make some hard choices. Ask yourself: "What can I live without, at least for the short term, to reduce expenses?" Maybe you can skip that daily coffee drink, take your lunch to work or cut back on how many times a week you eat at a restaurant.

NerdWallet has detailed advice on How to Stay Afloat Financially in a Federal Shutdown on its website.

PUT IT ON AUTO-PILOT

“Too many Americans spend first and save what's left over which means savings becomes the lower priority,” Bankrate’s Hamrick said. “It really should be save first and spend what’s left.”

That’s why it’s best to make savings automatic. What you don’t see, you can’t spend. Open a savings account — you can earn more than 2 percent interest on a high-yield online savings account — and make it your designated rainy-day fund. That means you won’t touch it unless there’s a genuine financial emergency.

Pick an amount that you can afford to pull out of each paycheck, and have it automatically deposited into that savings account. Your employer can probably help you set that up.

It doesn’t need to be a lot of money at first, the key is to get started. Save just $40 from every bi-weekly paycheck and in a year, you’ll have more than $1,000 in your emergency fund, not counting interest.

HOW TO DEAL WITH FINANCIAL FALLOUT FROM THE FEDERAL SHUTDOWN

The repercussions from missing two paychecks did not magically disappear with the stroke of a presidential pen. There are loans to be repaid and late bill payments can damage credit scores.

“People who hit bottom with their finances during the shutdown face more difficult days and months ahead,” said Bruce McClary, vice president of communications for the National Foundation for Credit Counseling (NFCC). “This isn’t over by a longshot.”

If your retroactive pay won’t cover all the debt you owe, you’ll need to prioritize. Clearly, your mortgage or rent, and car payments come first. Then pay off the most expensive debt — that would be a payday loan.

“Payday loans are the ones that are the most dangerous and can extract the most fees every single day that those are outstanding,” said Scott Astrada with the Center for Responsible Lending.

If you took out a zero percent interest loan from your bank or credit union, be sure to pay off that loan before the interest-free period ends.

With credit card bills, if you make the minimum payment this time (something financial experts normally frown upon), you won’t get hit with a late penalty fee and you won’t damage your credit score.

Keep communicating with your lenders. Let them know you’re working to get back on track. Ask what they can do to limit late fees or any other penalties.

“You may have to do some juggling with your bills and maybe even postpone some payments to take care of more urgent matters, but you should be able to get back on track,” McClary said. “It's going to take a little bit of time and some hard work.”

HELP IS AVAILABLE

Hundreds of banks and credit unions across the country, as well as the major credit card companies, have offered assistance to federal workers who were not being paid. And they continue to offer help.

“We continue to encourage all those affected to reach out to their financial institution, if they still need assistance,” said Jeff Sigmund, vice president of public relations at the American Bankers Association.

The National Foundation for Credit Counseling (NFCC) has a free Monthly Budget Planner to that makes it easy to track your income and expenses. A non-profit credit counselor can help you set up a budget or figure out how to juggle all your bills. Find one near you on the NFCC website.

MORE FROM BETTER

Want more tips like these? NBC News BETTER is obsessed with finding easier, healthier and smarter ways to live. Sign up for our newsletter and follow us on Facebook, Twitter and Instagram.