The rule
You can contribute to an HSA only while you are covered by a qualifying high-deductible health plan and not enrolled in any part of Medicare, including premium-free Part A. Once you enroll, new contributions (including catch-up contributions) are no longer allowed. You can keep the money in the account and spend it.
The six-month trap
If you sign up for Medicare after 65 (or apply for Social Security benefits), Part A coverage can be backdated up to six months, but not before the month you turned 65. Contributions you made during those months can become excess contributions that face a tax penalty. To avoid this, stop contributing at least six months before you apply for Medicare or Social Security.
2026 HSA limits
| Coverage | 2026 limit | 2027 limit |
|---|---|---|
| Self-only | $4,400 | $4,500 |
| Family | $8,750 | $9,000 |
| Catch-up (age 55 or older) | $1,000 | $1,000 |
In the year you enroll in Medicare, your limit is generally prorated by the number of months you were eligible before Medicare began.
Using your HSA after you enroll
- You can spend HSA money tax-free on qualified medical expenses.
- It can pay Medicare premiums: Part B, Part D, and Medicare Advantage premiums.
- It cannot pay Medigap premiums.
If you are still working at 65
If you have employer coverage and delay Medicare under a Special Enrollment Period, you can keep contributing to your HSA until you enroll. Remember Part A can be backdated, so plan six months ahead.