The confidence of retirees in their financial future has nearly doubled since the recession, the Employee Benefits Research Institute said Tuesday in its comprehensive 25th annual retirement confidence survey.

Close to two out of five retirees say they are very confident they will be able to live comfortably for the remainder of their golden years, compared to one out of five four years ago, 37 percent versus 20 percent.

Yet for adults still in the workforce, faith in having a secure retirement remains low despite gains in the stock market and housing values. Only 22 percent are highly confident they will be able to live comfortably when they stop working.

One sign their confidence is improving, is a decline by almost half in the number of workers postponing retirement, from 25 percent in 2009 to 13 percent this year.

The improved ease of mind for retirees shows up in a rising confidence that they will be able to pay their medical expenses without significantly crimping their standard of living.

The percentage of retirees very confident they’ll be to pay their medical expenses has risen to 39 percent in 2015 from 24 percent in 2013, while optimism about potential long-term care costs climbed to 25 percent from 16 percent.

Contributing to their brighter outlook, said EBRI, is a lessening of retirees’ debt worries.

The percentage of retirees concerned about how much they owe has dropped by close to a third, from 44 percent in 2014 to 31 percent currently.

For those in the labor force, roughly half of families have tried to calculate how much they will need to live comfortably after they stop working, while two-thirds feel they are behind schedule in planning and saving for retirement.

The results are based on an EBRI poll of 1,003 workers and 1,001 retirees in January and February.