So you think you're ready to leave the workforce? Before you hand in your notice, make sure you're fully prepared to support yourself during retirement. And this doesn't just mean having enough money in your travel fund. There's one big expense that could cost you a fortune during your senior years: healthcare.

You'll probably be surprised by how much healthcare costs you -- especially if you're counting on Medicare to pay most of your bills. But there's a lot Medicare doesn't cover, so you need to be prepared -- you don't want to go broke paying for care and struggle for the rest of your life. To avoid this fate, you should know how much the experts recommend retirees have saved to cover healthcare. 

Doctor talking with senior patient

Image source: Getty Images.

You'll need $280,000 for healthcare costs as a senior couple

Fidelity recently published its 16th annual estimate of retiree healthcare costs, and the numbers might be shocking. Based on life expectancies, Fidelity projects that a 65-year-old-couple would need $280,000 for all their medical expenses during retirement.  

Men were found to need less than women, with Fidelity projecting a senior male would need $133,000. A 65-year-old female would need around $147,000, as women tend to live longer. The amount seniors are projected to need is 2 percent higher than the amount Fidelity estimated in 2017. It's also 75% higher than in 2002, when Fidelity first projected the costs of senior healthcare, putting it at $160,000 per couple. 

How to cover these huge costs

Obviously, saving $280,000 for healthcare can be a huge burden, especially when you're also trying to build a retirement nest egg to cover other needs.  

One of the best options is to invest in a health savings account (HSA) throughout your career, if you're eligible. These accounts -- which you can invest in if you have a qualifying high-deductible healthcare plan -- allow you to make pre-tax investments. And if you make withdrawals to cover healthcare expenditures, withdrawals are also tax-free. HSAs provide some of the best tax benefits of any account because you save on taxes both when you invest and when money comes out. 

While many people with HSAs withdraw funds on an ongoing basis to cover immediate healthcare needs, you can benefit from tax-free growth -- and get closer to amassing the $280,000 you and your spouse might need as seniors -- if you leave HSA contributions invested and allow them to grow. 

Those who aren't eligible to contribute to an HSA must take this $280,000 projection into account when deciding how much to invest in a 401(k) or IRA. If you start saving at age 35, retire at 65, and earn a 7% annual return on investments, you'd need to put around $2,970 into a 401(k) or IRA annually to save enough to spend $280,000 on healthcare. You may want to increase contributions accordingly. 

You can also look into ways to cut care costs as a senior, such as selecting the right Medicare plan and talking with your doctor about reducing costs of care. 

Don't let high medical costs destroy your retirement

Around a quarter of current retirees have found health expenses prevent them from living the retirement they expected, according to a survey by Nationwide.

You don't want your retirement plans derailed because you need to pay for expensive medical procedures. Make sure you have a nest egg dedicated to covering care costs so you can use the rest of your money to enjoy life in retirement. 

The Motley Fool has a disclosure policy.