You can keep contributing to an HSA after you retire, as long as you’re covered by a qualifying High Deductible Health Plan and haven’t enrolled in any part of Medicare. Employment has nothing to do with it. For 2026, an eligible retiree can put in up to $4,400 with self-only HDHP coverage or $8,750 with family coverage, plus a $1,000 catch-up contribution at age 55 or older.1Internal Revenue Service. Rev. Proc. 2025-19
Medicare Is the Line That Ends Contributions
Enroll in Medicare Part A, Part B, Part C, or Part D, and your HSA contribution limit drops to zero starting with the first month that coverage takes effect.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans That’s true even if you also keep a private HDHP running alongside Medicare.3Internal Revenue Service. Instructions for Form 8889 (2025)
Being eligible for Medicare is not the same as being enrolled. Turning 65 does not by itself disqualify you. If you delay signing up for every part of Medicare and stay on a qualifying HDHP, you can keep contributing past 65.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The cutoff tracks your enrollment date, not your birthday.
The Social Security Trap at 65
If you’re already collecting Social Security retirement benefits when you turn 65, Medicare Parts A and B start automatically. You don’t apply, and no one asks whether you want it.4Social Security Administration. Medicare (Publication No. 05-10043) The moment that enrollment takes effect, your HSA eligibility ends.
Retirees who claimed Social Security early and kept contributing to an HSA through a private HDHP often walk into this without warning. To keep contributing past 65, you need to delay both Medicare enrollment and Social Security.
The Six-Month Retroactive Coverage Rule
If you apply for Medicare Part A after turning 65, coverage is backdated up to six months from your application date, though it can’t start before the month you turned 65.5Centers for Medicare and Medicaid Services. Original Medicare (Part A and B) Eligibility and Enrollment The same retroactive window applies when you apply for Social Security after 65, because Social Security triggers automatic Part A.6Medicare. When Does Medicare Coverage Start?
That backdated coverage invalidates any HSA contributions you made during those months. Under IRS rules, your contribution limit is zero for any month you’re enrolled in Medicare, and retroactive enrollment counts.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans Anything you contributed during the retroactive window becomes an excess contribution, subject to a 6% excise tax each year it stays in the account.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts
The practical rule: stop HSA contributions at least six months before you plan to enroll in Medicare or claim Social Security after age 65.
Pro-Rating in the Year You Enroll
In the year your eligibility changes, the annual limit is calculated month by month. Divide the annual limit by 12 and multiply by the number of months you were eligible, meaning you had HDHP coverage and no Medicare enrollment on the first day of that month.3Internal Revenue Service. Instructions for Form 8889 (2025)
Say you enroll in Medicare effective July 1, 2026. You were eligible for six months, January through June. Your pro-rated self-only limit is 6/12 of $4,400, or $2,200. At 55 or older, you can pro-rate the $1,000 catch-up the same way, adding $500 for a total of $2,700.1Internal Revenue Service. Rev. Proc. 2025-19 Count only the months you were actually eligible; if Part A gets backdated, those months come off the count.
Keeping HDHP Coverage After You Leave Your Employer
When you retire off an employer plan, you can maintain HDHP coverage by buying a qualifying plan through the health insurance marketplace or through COBRA continuation. As long as the plan meets the HDHP thresholds, your contributions stay fully deductible from gross income.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans For 2026, a plan qualifies as an HDHP if it has:1Internal Revenue Service. Rev. Proc. 2025-19
- A minimum annual deductible of $1,700 self-only or $3,400 family, and
- Maximum out-of-pocket expenses of $8,500 self-only or $17,000 family, not counting premiums.
Starting in 2026, bronze and catastrophic plans, whether bought on a marketplace exchange or not, are treated as HSA-compatible. This change came in through the One, Big, Beautiful Bill Act and opens HSA contributions to retirees under 65 whose marketplace plans wouldn’t have met the traditional HDHP definition.8Internal Revenue Service. One, Big, Beautiful Bill Provisions
When One Spouse Goes on Medicare
The Medicare bar is personal, not household. When one spouse enrolls in Medicare, the other spouse can still contribute if they independently qualify, meaning they’re on an HDHP and not enrolled in Medicare themselves. A spouse with family HDHP coverage can contribute up to the full family limit of $8,750 in 2026, plus their own $1,000 catch-up at 55 or older.1Internal Revenue Service. Rev. Proc. 2025-19
The funds in the eligible spouse’s HSA can then pay qualified medical expenses for the Medicare-enrolled spouse tax-free.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The account holder is the one who has to qualify; anyone can contribute to an eligible person’s HSA.
If You Contribute Too Much
Excess contributions, whether from retroactive Medicare coverage, a mid-year eligibility change, or a miscalculation, carry a 6% excise tax for every year they stay in the account.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts The tax is reported on IRS Form 5329.9Internal Revenue Service. Additional Taxes on Qualified Plans (Including IRAs) and Other Tax-Favored Accounts
You can avoid the penalty by withdrawing the excess amount, plus any earnings on it, before the tax filing deadline for the year the excess was contributed, including extensions. If you already filed without removing the excess, you get an additional six months after the original due date (not counting extensions) to pull the money out, provided you file an amended return.3Internal Revenue Service. Instructions for Form 8889 (2025) Earnings withdrawn with the excess are taxable in the year the excess was contributed.10Internal Revenue Service. Instructions for Forms 1099-SA and 5498-SA
Miss those deadlines and the 6% tax repeats every year until you either withdraw the excess or absorb it by under-contributing in a future year when you’re still eligible.