A decent rainy-day fund could be vital to keeping your New Year's goals. Among the nearly 7 in 10 adults who plan to make a financial New Year's resolution, 40 percent have a goal of setting and following a budget, according to a forthcoming report from the National Endowment for Financial Education. Getting out of debt is a resolution for 39 percent, while 32 percent want to establish savings and 31 percent hope to boost their retirement savings. The organization polled 2,165 U.S. adults in mid-December.

We have to change our mindset and realize that these expenses are not if they will happen, but when they will happen. Emergency savings can alleviate uneasiness. Ted Beck National Endowment for Financial Education

But there are plenty of roadblocks to meeting those goals: Sixty-three percent of those surveyed said they experienced a "financial setback" in 2017. Common financial shocks included transportation (23 percent), housing repairs or maintenance (20 percent) and an inability to keep up with debt payments or bills (16 percent). That trend could easily be repeated in 2018, with Americans expecting their three largest expenses to include paying off debt, home expenses (excluding their mortgage) and transportation expenses.

Consumer debt keeps climbing Category Quarterly change (from Q2 2017) Annual change (from Q3 2016) Total as of Q3 2017 Mortgage debt (+) $52 billion (+) $393 billion $8.74 trillion Home equity line of credit (-) $4 billion (-) $24 billion $448 billion Student loan debt (+) $13 billion (+) $78 billion $1.36 trillion Auto loan debt (+) $23 billion (+) $78 billion $1.21 trillion Credit card debt (+) $24 billion (+) $61 billion $808 billion Total debt (+) $116 billion (+) $605 billion $12.96 trillion

"We have to change our mindset and realize that these expenses are not if they will happen, but when they will happen," Ted Beck, president and CEO of NEFE, said in a statement. "An emergency savings, even a modest amount as a starting point, can alleviate uneasiness." Here's how to prepare to better weather financial setbacks in 2018, without giving up on your New Year's resolutions.

Create a savings floor

Financial advisors typically recommend building to have three to six months' worth of expenses set aside. But even a small rainy-day fund can help, said Pamela Capalad, a certified financial planner and founder of Brunch & Budget in Brooklyn, New York. "Have the floor on your savings be $400 or $500," she said.

That's enough to cover a moderate unexpected expense — so you don't need to pull out your credit card and set back your other financial goals, Capalad said. Aim to replenish those savings quickly if you do need to tap them. In foundation's survey, 36 percent of consumers said they would need to use credit to cover an unexpected expense, versus 31 percent who would use emergency savings and 28 percent, cash.

Look ahead

Some financial shocks aren't a surprise, said Kevin Meehan, a certified financial planner and the regional president of Wealth Enhancement Group in Itasca, Illinois. If you can see, for example, that your aging refrigerator is acting up or that your kid is probably going to need braces, use that as an opportunity to reassess spending and build savings to help handle that eventual expense. "If you see something coming, that's where you go back to need versus wants," Meehan said. "You'll have to weigh putting off discretionary purchases in favor of preparing for that."

Jamie Grill | Getty Images

Assess your resources in the event of an unexpected financial setback, he said. It helps to know what assets you have available to use, and if you must take on debt, which avenues (such as a home equity line of credit or a zero-percent balance transfer offer) might be least damaging.

Stop the cycle