Generation X is better prepared than baby boomers for retirement, although they are also more worried about it, according to a survey released by the PNC Financial Services Group on Thursday.

The survey shows that 51 percent of Gen Xers are saving more for retirement because of the recession, while only 37 percent of boomers are.

The survey measured the attitudes about retirement preparedness found among Generation Xers, those between the ages of 35 and 49, and baby boomers, between the ages of 50 and 68. The 1,017 respondents had at least $50,000 in investable assets.

Generation X respondents expect to need an average of $1.5 million for retirement, while baby boomers’ average expectation is slightly lower at $1.3 million. However, 74 percent of boomers have yet to reach the $1 million milestone. Sixty-five percent of Gen Xers expect to be solely responsible for their retirement, while 45 percent of boomers feel that way.

“One outcome of the Great Recession is that we are seeing meaningful changes in financial behavior in 71 percent of all survey respondents, especially among Generation X,” says Celandra Deane-Bess, senior wealth planner for PNC Wealth Management and chair of PNC’s national practice group for retirement. “One of the most challenging tasks is changing habits, particularly in managing spending and debt and increasing savings and seeking advice.”

Younger investors worry more about not having enough to live on for the rest of their lives. Seventy-three percent of Generation Xers say they worry about whether their money will last through retirement, while only 55 percent of boomers do.

Most of the survey respondents (94 percent) expect Social Security to be there when they retire. As has been reflected in a number of surveys, a majority (84 percent) of respondents fear that health-care costs will be too expensive in retirement, making that the most pressing concern.