Can you cover an unexpected $400 expense?

Four in ten Americans can't, according to a new report from the Federal Reserve Board. Those who don't have the cash on hand say they'd have to cover it by borrowing or selling something.

The bright side? That's an improvement from half of adults being unable to cover such an expense in 2013. The number has been ticking down each year since.

Overall, the financial situation of American households has improved during the past five years, according to the Economic Well-Being of U.S. Households report. It shows that in 2017, 74% of adults reported feeling at least "okay" financially, an increase of 10 percentage points from the first survey four years earlier.

"This year's survey finds that rising levels of employment are translating into improved financial conditions for many but not all Americans," Federal Reserve Board Governor Lael Brainard said in a press release, "with one-third now reporting they are living comfortably and another 40% reporting they are doing okay financially."

Still, many are struggling. Notable differences remain across race, ethnicity, education levels and geography. The report shows hardship continues for people working to repay college loans, cover emergency expenses and manage retirement savings.

For the first time the report also looked at the opioid epidemic, reporting that one out of five adults personally knows someone with an addiction to painkillers. Exposure does not vary much by education level or by local economic conditions.

Related: Millennials born in 1980s may never recover from the Great Recession

The study was drawn from the Board's fifth annual Survey of Household Economics and Decisionmaking, which looks at the economic health of Americans. The survey of 12,000 people examined their income, employment, unexpected expenses, banking and credit, housing, education, and retirement planning in November and December 2017.

While showing that Americans' financial lives are moving in a positive direction, the report does raise some concerns about their most basic levels of financial stability: emergency funds and retirement.

"The finding that four-in-ten adults couldn't cover an unexpected $400 expense without selling something or borrowing money is troubling," said Greg McBride, chief financial analyst at Bankrate.com. "Nothing is more fundamental to achieving financial stability than having savings that can be drawn upon when the unexpected occurs."

McBride suggests setting up automatic direct deposits from a paycheck to a savings account that can build some much-needed financial cushion.

He's also concerned about another finding in the report: fewer than 40% of adults think their retirement savings are on track.

"The burden is on us as individuals to save for our retirement," he says. "Take control of your financial destiny by contributing to an employer-sponsored retirement plan such as a 401(k) via payroll deduction, or arrange automatic monthly transfers from your bank account into an IRA."

Related: How to save for retirement without a 401(k)

More concerning are the 25% of Americans with no retirement savings whatsoever, according to the report.

Some of this may be due to the lack of employer-sponsored retirement plans, as well as people piecing together several part-time jobs, which may not offer benefits.

The report found that while most workers are satisfied with the wages and benefits from their current job and are optimistic about their future job opportunities, challenges remain, particularly with irregular job schedules.