Among baby boomers with a chronic physical or mental-health condition that requires medication or treatment (49 per cent), a third (32 per cent) have changed or considered changing their retirement plans to pay for health-related costs, according to a new survey by Sun Life Financial Inc.

The survey, which polled 750 baby boomers and 750 millennials, found a similar percentage (32 per cent) of baby boomers cited health-care costs as a top factor contributing to the increased cost of living, second only to inflation (83 per cent) and ahead of housing costs (31 per cent) and market volatility (23 per cent).

Read: 60% of global DC pension plan members say inflation impacting retirement plans: survey

Millennials are following in similar footsteps. Roughly a third (31 per cent) of millennials said they have a chronic physical or mental-health condition requiring medication or treatment. Among these respondents, more than half (52 per cent) said they haven’t factored the cost of managing their chronic condition into their retirement plans and women (61 per cent) were more likely than men (43 per cent) to have not factored in these costs.

“Many retirees are not prepared or aware of the out-of-pocket medical expenses in retirement,” said Jacques Goulet, president of Sun Life Canada, in a press release. “These costs can have a significant effect on retirement, especially for those living with a chronic physical or mental-health condition that requires ongoing treatment.”

Read: Gen Z workers want to retire at 61, but 99% facing obstacles to saving for retirement: survey