A health savings account (an HSA) is a form of tax-advantaged retirement account designed for healthcare spending. You can make contributions to your account at any time so long as you aren’t enrolled in Medicare. During any period when you are enrolled in Medicare, you cannot make contributions to a qualified HSA. If you have other questions about retirement savings and healthcare, it may be a good idea to talk to a financial professional who can help you plan. A financial advisor can play such a role, and SmartAsset’s free advisor matching tool can match you with advisors that serve your area.
What Is an HSA?
A health savings account (HSA) is a tax-advantaged retirement account that shares features of both a 401(k), an IRA and a Roth IRA. Like a 401(k) and IRA, the money that you contribute to a HSA is fully tax deductible. You don’t pay federal or state income taxes on this money, and can even deduct it from your payroll (FICA) taxes.
You can build an HSA either individually or through your employer. With an individual plan you would make contributions yourself, then make the relevant deductions on your end-of-year taxes. With an employer plan, your payroll department could make HSA contributions and tax adjustments in the same way that they do with a 401(k). Employers who run an HSA program can also make contributions for their employees.
In addition, like a Roth IRA, withdrawals from an HSA are tax-free so long as you use the money to pay for a qualified medical expense. This includes all of the account’s gains over time, meaning that you have a pool of completely untaxed money available for medical spending.
HSA Withdrawals
After age 65 you can withdraw money from an HSA for any reason without incurring a penalty. However, if you spend the money on non-medical expenses you will have to pay taxes on your withdrawals in the same manner that you would with an IRA or a 401(k) plan. This structure has made health savings accounts potentially popular as a retirement vehicle for qualifying individuals. (That said, both health and financial experts generally do not recommend this program overall, for reasons explained below.)
Essentially an HSA offers all of the advantages of a 401(k) and an IRA, while having the additional benefit of eliminating taxes entirely from health-related spending. However, if you withdraw money before age 65 and spend it on non-healthcare expenses, you are subject to both income taxes and an additional tax penalty.
When Can You Contribute to an HSA?

To contribute to an HSA you must meet three criteria:
- You must not be enrolled in Medicare;
- You must not be claimed as a dependent on someone else’s taxes;
- You must be enrolled in a qualifying high-deductible health insurance plan with no other form of health insurance.
You never lose access to your health savings account. The money is yours, subject only to any form of early withdrawal penalties depending on how you use it. However, if any of those three criteria change, you can no longer continue making contributions to this account.
Medicare enrollment means that most people cannot continue making contributions to their HSA once they retire. At 65 you are eligible to receive Medicare, and most (if not all) Social Security recipients are automatically enrolled in this program. Once you enroll, you cannot make additional health savings account contributions.
Your HSA can play a role in covering health care costs in retirement, but it’s just one part of your overall financial picture. Use SmartAsset’s retirement calculator to see how your savings and accounts could work together to support your income over time.
Retirement Calculator
Calculate whether or not you’re on track to meet your retirement savings goals.
About This Calculator
To estimate how much you may need to save for retirement, we begin by calculating how much you're expected to spend over the course of your retirement. This includes estimating the income you'll need based on your lifestyle preferences, then factoring in how many years you may spend in retirement. We assume a lifespan of 95 by default, though you can adjust it after your calculation is complete.
Once we have a clearer view of your total retirement needs, we use our models to evaluate your existing and future resources. This includes estimating retirement income from Social Security and the impact of current retirement plans, pensions and other accounts. For additional inputs and a comprehensive retirement plan, please see our full Retirement Calculator.
Assumptions
Lifespan: We assume you will live to 95. We stop the analysis there, regardless of your spouse's age.
Retirement accounts: We automatically distribute your future savings optimally among different retirement accounts. We assume that the IRS contribution limits for your retirement accounts increase with inflation.
Social Security: We estimate your Social Security income using your stated annual income and assuming you have worked and paid Social Security taxes for 35 years prior to retirement. Our estimate is sensitive to penalties for early retirement and credits for delaying claiming Social Security benefits.
Return on savings: We assume the percentage return on your savings differs by whether you're pre- or post-retirement and by account type, with a distinction between investment accounts and savings accounts. This assumption does not account for market volatility or investment losses and assumes positive growth over time. All investing involves risk, including the possible loss of principal.
SmartAsset.com is not intended to provide legal advice, tax advice, accounting advice or financial advice (Other than referring users to third party advisers registered or chartered as fiduciaries ("Adviser(s)") with a regulatory body in the United States). Articles, opinions, and tools are for general information only and are not intended to provide specific advice or recommendations for any individual. The retirement calculator is meant to demonstrate different potential scenarios to consider, and is not intended to provide definitive answers to anyone's financial situation. We always suggest that you consult your accountant, tax, legal or financial advisor concerning your individual situation.
This is not an offer to buy or sell any security or interest. All investing involves risk, including loss of principal. Working with an adviser may come with potential downsides such as payment of fees (which will reduce returns). Past performance is not a guarantee of future results. There are no guarantees that working with an adviser will yield positive returns. The existence of a fiduciary duty does not prevent the rise of potential conflicts of interest.
Post-Retirement Contributions
Someone who wants to keep making contributions after retirement can do so by either not enrolling in Medicare or by withdrawing from the program. While rare, both are options. However, it is unlikely that this would make sense financially. In most cases Medicare offers more in terms of dollar value than a health savings account would.
In 2024, the IRS defined a high deductible insurance plan as one with a deductible of at least $1,600 for an individual or $3,200 for a family ($1,650 and $3,300 in 2025). These amounts are adjusted periodically to account for inflation. If you have a healthcare plan with lower deductibles, or if you are uninsured, you cannot contribute to a health savings account.
Due to the high-deductible insurance requirement a number of healthcare and financial experts consider HSAs a bad idea for many individuals. The tax advantages of this program are excellent, so in a vacuum a health savings account could help with retirement planning.
When Is an HSA a Good Idea?
For most people, the best-case use for a health savings plan is when you’re young. A healthy adult in their 20s can often afford to enroll in a high-deductible plan, since their medical needs are often defined by catastrophic risk rather than routine maintenance. This person can make health savings account contributions during their so-called “young invincible” years.
Eventually they will phase into a more comprehensive healthcare plan and no longer will be allowed to make contributions to the HSA, but they keep access to the account. That money can grow throughout their adult years and provide a supplemental retirement fund when the time comes.
For someone who does have a high-deductible plan, contributing to an HSA is a great option. However, if you have the means, you are usually better off enrolling in a more comprehensive health insurance plan and losing access to the HSA program.
Bottom Line

You can contribute to a health savings account after you retire, so long as you are not enrolled in Medicare. If you are enrolled in Medicare you cannot contribute to a health savings account, but there are other ways of saving for expected and unexpected healthcare costs. Try to make sure that you’re prepared for any and all healthcare expenses that could come your way.
Tips for Saving for Retirement
- Retirement saving can be easier when you have a financial professional to work with. Finding a qualified financial advisor doesn’t have to be hard. SmartAsset’s free tool matches you with vetted financial advisors who serve your area, and you can have a free introductory call with your advisor matches to decide which one you feel is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
- Retirement planning is a complicated project. Between tax-advantaged accounts, Social Security, personal assets and more, this takes real work. SmartAsset has you covered with free online resources that can help. Try using our free retirement calculator today.
Photo credit: ©iStock.com/erdikocak, ©iStock.com/marchmeena29, ©iStock.com/mkurtbas
