Most Americans have an up-hill battle to achieve a comfortable retirement, but the hill is steeper if they’re women or from Generation X.

According to a survey by San Carlos, Calif.-based Personal Capital, nearly one in three millennials, Gen Xers and baby boomers have no money saved for retirement. Millennials, now aged 20 to 37 years old, are faring the worst among the generations, with 39 percent of the survey’s millennial respondents having nothing at all saved, compared with 34 percent of generation x respondents aged 38 to 53, and 32 percent of baby boomers aged 54 to 72.

While more women than men among the respondents believe that adhering to a financial plan is crucial to a secure retirement (62 percent of women versus 47 percent of men), 40 percent of the women said they had nothing saved for retirement, compared to 33 percent of men.

The reasons for the shortfall may be as much behavioral as they are cultural an economic, said Michelle Brownstein, senior vice president of Personal Capital’s Private Client Group.

“If we ask female clients about their priorities, in many cases the first things that come out are that they want to make sure that their families are well cared for,” said Brownstein. “They’re spending money on their children and parents instead of their future selves.”

Women were also narrowly more likely than men to believe that using a financial advisor was critical to a successful retirement, while 28 percent of women thought accessing an advisor was key, just 24 percent of men said the same. Yet women showed signs of being less aware of their financial situations: Though 56 percent of the men responding to the survey said they knew their net worth, 71 percent of the women weren’t aware of their net worth.

The survey’s respondents illuminated potential reasons that women are falling behind – more than one quarter of the working women respondents, 27 percent, did not have access to an employer-sponsored retirement plan, compared to 19 percent of the working men.

“There aren’t clear-cut answers for why this is the case; it’s more that several factors have come together to make retirement more difficult for women,” said Brownstein. “One being that there is more part-time work happening on the female side of things, and these employees are usually not eligible for plans. There is still a gender wage gap, much of that can be attributed to the jobs that women traditionally choose for themselves. The gap likely starts even earlier: traditionally, men are the breadwinners and also run household finances, so boys get more of a financial education at home than girls.”

Women who did have access to a retirement plan were less likely to contribute to them; 58 percent of women used their retirement plans versus 67 percent of men. Women are less likely to max out their annual contributions; 16 percent of women contributed the maximum amount versus 26 percent of men.

Generation X, now between ages 38 and 53, has also fallen behind in their retirement savings -- though 56 percent of Gen Xers believe they will need at least $1 million to retire, more than one-third of the respondents had not saved a dime toward their retirement. The sequence of market events between the dot-com bubble of the late 1990s and the 2008 global financial crisis may have deterred generation xers from entering or staying invested in the market.

It may also be that generation xers are too busy with other financial priorities to worry about their retirement or engage with their finances, said Brownstein. In the survey, more than three-fifths of Generation X respondents didn’t even know their net worth.

“To me, it says that their finances are not getting prioritized,” said Brownstein. “They’re acknowledging that they need to do something, but they’re not taking any action. Their lives have gotten to the point where things are complicated, they have kids, marriages, aging parents, homes, retirement ends up very much de-prioritized.”

Generation X is also less likely than millennials to max out their employer retirement plan -- while 22 percent of millennials contribute the annual maximum to their plan, only 18 percent of generation xers were doing the same.

Many Americans expect government programs to help fill the retirement savings gap. One in four pre-retiree respondents expected Social Security to be their primary source of retirement income. While 15 percent of millennials expect to lean mostly on Social Security to meet their retirement income needs, nearly one-third of Generation Xers, 29 percent, said that they will primarily draw on Social Security.

According to the Social Security trustees 2018 annual report, the program is now drawing on its reserves to make monthly payments to participants and will run out of money by 2034. If nothing changes, younger generations can expect smaller payouts.

The average American still retires well before the full retirement age, and most future retirees plan to do the same, with 51 percent planning to retire at age 65 and younger, at least a year before the current full retirement age.

“I don’t think we do a good job as a society on educating anyone on how to live a healthy financial life,” said Brownstein. “So many people don’t even know where to start, they don’t want to make a wrong decision so they become frozen in time and don’t make any financial decisions. Finances are such a taboo topic, and the discomfort probably comes from a lack of exposure. People need more tools to engage with their finances without having to talk to anybody until they’re ready, it cuts down on the intimidation factor that seems to be a hurdle for men and women at all ages.”

The survey was conducted online among 2,008 U.S. adults between March 1 and March 7, 2018.