Medicare and HSA: The 6-Month Rule and What You Can Still Contribute
Zero. That's your HSA contribution limit for every month you're enrolled in any part of Medicare. Federal tax law says so in one sentence, and the IRS adds the part that catches people: the rule also applies to months Medicare covers retroactively. Sign up for premium-free Part A after 65 and it can be backdated up to six months, which can turn contributions you already made into excess contributions.
The money already in your health savings account is a different story. You keep it, it can keep growing, and you can spend it tax-free on qualified medical expenses for the rest of your life, including most Medicare premiums. The one premium it won't touch is Medigap.
Source: 26 U.S.C. 223 (b)(7); IRS Publication 969; Medicare.gov, When does Medicare coverage start?; IRS Rev. Proc. 2026-24.
Enrolled, not eligible: what ends contributions
The rule is in 26 U.S.C. 223(b)(7): your HSA limit is zero starting with the first month you're "entitled to benefits" under Medicare, and every month after. The IRS reads "entitled" as eligible and enrolled. Turning 65 by itself doesn't end anything. IRS Notice 2004-50 (Q&A-2) gives the example of a 66-year-old on her employer's high-deductible health plan (HDHP) who hasn't applied for Part A or Part B: she can keep contributing, and under Q&A-3 she can still make the $1,000 catch-up contribution for people 55 and older.
Enrollment in any part counts. The IRS has said so for each piece:
- Part A only (the common case for people still working): ends contributions. Pub 969 says the limit is zero beginning with the first month you're enrolled in Medicare.
- Part B only: a government retiree enrolled in Part B but not Part A isn't an eligible individual either (Notice 2004-50, Q&A-4).
- Part D or any other Medicare benefit: same result (IRS Notice 2008-59, Q&A-6).
What doesn't end is the account. Pub 969 says amounts left at the end of a year generally carry over to the next year, and earnings aren't taxed while they stay in the HSA. You just can't add new money, and neither can your employer.
HSA limits for 2026 and 2027
The IRS adjusts the HSA limits for inflation every year. The 2026 numbers came in Rev. Proc. 2025-19 and the 2027 numbers in Rev. Proc. 2026-24. The $1,000 catch-up for people 55 and older is fixed by statute and doesn't change.
- 2026
- 2027
Source: IRS Rev. Proc. 2025-19; IRS Rev. Proc. 2026-24.
Show the numbers
| 2026 | 2027 | |
|---|---|---|
| Self-only HDHP | $4,400 | $4,500 |
| Family HDHP | $8,750 | $9,000 |
| 2026 | 2027 | |
|---|---|---|
| Self-only HDHP limit | $4,400 | $4,500 |
| Family HDHP limit | $8,750 | $9,000 |
| Catch-up, age 55+ (per person) | $1,000 | $1,000 |
| Self-only + catch-up | $5,400 | $5,500 |
| HDHP minimum deductible, self-only / family | $1,700 / $3,400 | $1,750 / $3,500 |
| HDHP out-of-pocket maximum, self-only / family | $8,500 / $17,000 | $8,700 / $17,400 |
Source: IRS Rev. Proc. 2025-19; IRS Rev. Proc. 2026-24; 26 U.S.C. 223(b)(3).
Those are annual figures, but the law actually works month by month. Under 26 U.S.C. 223(b)(1)-(2), your limit is the sum of 1/12 of the annual amount for each month you're an eligible individual on the first day of the month. Medicare coverage always starts on the first of a month, so the month your Medicare starts counts as a zero month.
The IRS's own example in Pub 969: someone who turned 65 in July 2025, enrolled in Medicare, and had self-only coverage plus the catch-up could contribute $2,650.00 for 2025 ($5,300 × 6 ÷ 12). Note that the catch-up gets prorated too. Using 2027 numbers, the same person would get $458.33 of room for each eligible month.
The 6-month Part A lookback
Here's the trap. If you sign up for premium-free Part A after you turn 65, Medicare.gov says your coverage starts 6 months back from when you sign up or apply for Social Security (or Railroad Retirement) benefits. It can't start earlier than the month you turned 65. For someone who retires at 66 or 67, that backdated hospital coverage is usually harmless.
For an HSA it's the opposite of a gift. Pub 969: "This rule applies to periods of retroactive Medicare coverage. So if you delayed applying for Medicare and later your enrollment is backdated, any contributions to your HSA made during the period of retroactive coverage are considered excess." That includes your employer's payroll contributions.
That's why both Medicare.gov pages give the same advice: stop HSA contributions (yours and your employer's) at least 6 months before you apply for Medicare or Social Security. Here's how the backdating plays out for a hypothetical person who turns 65 in August 2027.
| Applies in | Part A can start | Last HSA month | 2027 HSA months |
|---|---|---|---|
| September 2027 | August 2027 (age-65 floor) | July 2027 | 7 |
| January 2028 | August 2027 (age-65 floor) | July 2027 | 7 |
| March 2028 | September 2027 | August 2027 | 8 |
| July 2028 | January 2028 | December 2027 | 12 |
Source: rule from Medicare.gov, When does Medicare coverage start? (Part A starts up to 6 months back, not before the month you turn 65); IRS Publication 969. Dates are a hypothetical example.
Look at the last row: apply in July 2028 and Part A reaches back to January 2028. The full 2027 limit is safe, but every 2028 contribution made before applying is excess.
Two more details. Part B follows its own enrollment periods (see our Initial Enrollment Period guide), and the 6-month lookback can't push Part A to a month before you were 65. If you apply during your Initial Enrollment Period, premium-free Part A starts the month you turn 65 (or the month before, if your birthday falls on the 1st).
Social Security turns on Part A for you
Many people never actively sign up for Medicare; it comes with Social Security. Medicare.gov: if you start getting Social Security benefits at least 4 months before you turn 65, you automatically get Part A and Part B when you turn 65. If you start benefits after 65, you automatically get Part A. The IRS built an example around exactly this case: someone turns 65 in August, applies for and begins receiving Social Security, is automatically enrolled in Medicare, and stops being HSA-eligible as of August 1 (IRS Notice 2004-50, Q&A-2, Example 2).
And you can't keep the Social Security check while turning down Part A. Social Security's own operations manual (POMS HI 00801.002) says people entitled to monthly benefits that come with Part A may not waive it. The only way out is to withdraw the benefit application, which means paying back every Social Security and Medicare benefit already paid.
In practice: if you want to keep funding an HSA past 65, you have to delay both Social Security and Medicare. If you're going to claim Social Security, treat the claim date as your Medicare application date and stop HSA contributions six months before it.
Worked example: turning 65 in August 2027
Hypothetical. Say Linda lives in Lakeland. She turns 65 in August 2027, has self-only coverage on her employer's HDHP all year, and qualifies for the catch-up. Her 2027 annual figure is $4,500 + $1,000 = $5,500, or $458.33 for each eligible month. Here are three ways her year could go, and what happens if she (and her employer) put in the full $5,500 anyway.
| Path A: Medicare at 65 | Path B: applies March 2028 | Path C: applies July 2028 | |
|---|---|---|---|
| Part A starts | August 2027 | September 2027 (backdated) | January 2028 (backdated) |
| HSA-eligible months in 2027 | 7 (Jan-Jul) | 8 (Jan-Aug) | 12 |
| 2027 limit (monthly math) | $3,208.33 ($5,500 × 7/12) | $3,666.67 ($5,500 × 8/12) | $5,500.00 |
| Excess if she contributed $5,500 for 2027 | $2,291.67 | $1,833.33 | None |
| 6% excise if the 2027 excess isn't withdrawn in time | $137.50 | $110.00 | None |
| 2028 contributions allowed | None | None | None; any 2028 contributions are excess |
Source: 2027 limits from IRS Rev. Proc. 2026-24; monthly rule from 26 U.S.C. 223(b); retroactivity from Medicare.gov, When does Medicare coverage start?; 6% from IRS Publication 969. Writer arithmetic, rounded to the cent.
Path B is the one that bites. Linda kept working, figured "I'm not on Medicare yet, so I can max out 2027," and only applied in March 2028. Medicare's backdating moved her Part A start to September 2027, which cut her 2027 limit from $5,500 to $3,666.67. The $1,833.33 difference is an excess contribution. Left in the account, it costs $110.00 in excise tax for 2027 and another 6% for each later year it stays. Caught in time, it costs nothing but some paperwork (next section).
If Linda had family HDHP coverage instead, the same 7-month math in Path A would give $5,833.33 ($10,000 × 7/12). One more trap: if you used the IRS "last-month rule" to contribute a full year's amount after becoming eligible late in the prior year, you must stay eligible through a testing period that runs to December 31 of the following year. Medicare starting inside that window makes the extra amount taxable income plus a 10% additional tax (Pub 969).
Put in too much? How to fix it
Excess HSA contributions aren't deductible, and Pub 969 says you generally owe a 6% excise tax on them (figured on Form 5329) for each tax year the excess stays in the account. Excess contributions your employer made are added to your gross income.
The fix is a corrective withdrawal. Pub 969 says you avoid the excise tax on the amount you take out if both of these are true:
- You withdraw the excess by the due date, including extensions, of your tax return for the year the contributions were made.
- You also withdraw any income earned on that excess, and report the earnings as "Other income" on your return for the year you withdraw them.
When you call your HSA custodian, say it's a corrective withdrawal of an excess contribution, so it isn't processed as an ordinary distribution. Tell your employer's benefits office too, so payroll contributions stop.
| Situation | What it means | What to do |
|---|---|---|
| Contributions for months before Medicare starts | Allowed, prorated by month | Keep them; contributions for a tax year can generally be made up to the next April filing deadline |
| Contributions for months Medicare covers (including backdated months) | Excess contribution | Withdraw the excess plus earnings by the return due date, including extensions |
| Excess left in the account | 6% excise tax each year it stays | Remove it; file Form 5329 for any year the tax applies |
| Excess made by your employer | Included in your gross income | Ask payroll to stop; remove the excess with earnings |
Source: IRS Publication 969 (Excess contributions; When to contribute).
Working past 65 with an HSA
If you're still working at 65 and covered by your employer's HDHP, delaying Medicare to keep contributing can make sense, but only if your job plan is set up to be your main coverage. Whether the employer plan or Medicare pays first depends on your employer's size and other rules, so check with your benefits office and read Medicare and employer coverage before you decide.
The good news on the Medicare side: an HSA with an HDHP based on your (or your spouse's) current employment counts as job coverage. Medicare.gov says you may qualify for a Special Enrollment Period to sign up for Part B without a penalty. That window runs until 8 months after the job or the group coverage ends, whichever comes first. COBRA isn't job coverage for this purpose and doesn't extend those 8 months; see Medicare and COBRA before you elect it.
Miss that window and the Part B penalty is 10% for each full 12-month period you could have had Part B but didn't, usually for as long as you have Part B (Medicare.gov, Avoid late enrollment penalties). My read: one more year of HSA contributions isn't worth risking a penalty that lasts as long as you have Part B, so don't let the HSA tail wag the Medicare dog.
Spouse rules
Each person's eligibility is separate. There's no joint HSA, and your Medicare doesn't end your spouse's eligibility.
- You're on Medicare, your spouse isn't. If your spouse is an eligible individual with family HDHP coverage, your spouse can contribute up to the full family limit to their own HSA. The IRS says other coverage of a spouse, including Medicare, doesn't reduce that limit; you just can't have any of it allocated to you (IRS Notice 2008-59, Q&A-16; IRS Notice 2004-50, Q&A-31, Example 5).
- Catch-up contributions are personal. Each spouse who is 55+ and not enrolled in Medicare gets their own $1,000, and it has to go into their own HSA. Once you're on Medicare, your $1,000 is gone; your spouse can't pick it up for you.
- Spending on each other. Your HSA can pay your spouse's qualified medical expenses. For Medicare premiums there's a wrinkle: they count only if the account holder is 65 or older. If you're 63 with the HSA and your spouse is 66 with Medicare, your HSA generally can't pay your spouse's Medicare premiums (IRS Notice 2008-59, Q&A-30). Once you turn 65, it can.
What your HSA can pay for on Medicare
Once you're on Medicare, the HSA becomes a tax-free bucket for your share of the costs. Medicare.gov lists deductibles, premiums, coinsurance and copayments. On premiums, the statute is specific: for an account holder 65 or older, premiums for any health insurance other than a Medicare supplemental policy count (26 U.S.C. 223(d)(2)(C)(iv)).
| Expense | Tax-free from your HSA? | Notes |
|---|---|---|
| Part B premium | Yes, if you're 65+ | Also if it's deducted from your Social Security check: you can reimburse yourself (Notice 2004-50, Q&A-45) |
| Part D premium | Yes, if you're 65+ | Also for your spouse or dependents (Notice 2008-59, Q&A-29) |
| Medicare Advantage premium | Yes, if you're 65+ | Medicare coverage, not a supplemental policy |
| Premium-Part A (if you pay one) | Yes, if you're 65+ | Pub 969: Medicare premiums count once you're 65 |
| Medigap (Medicare Supplement) premium | No | Excluded by statute and Pub 969 |
| Deductibles, coinsurance, copays | Yes | Qualified medical expenses for you, your spouse and dependents |
| Long-term care insurance premium | Yes, up to an age-based limit | Limit adjusted yearly |
| Non-medical spending after 65 | Taxable, but no 20% additional tax | Taxed as income; the 20% applies before 65 |
Source: IRS Publication 969 (Insurance premiums; Additional tax); 26 U.S.C. 223(d)(2)(C), (f)(4); IRS Notice 2004-50; IRS Notice 2008-59; Medicare.gov, Working past 65.
If you're weighing Original Medicare with a supplement against Medicare Advantage, don't let the HSA decide it; just know Medigap premiums have to come from other money. For how supplements work here, see Medicare Supplement (Medigap) insurance in Florida.
Keep records. Pub 969 says you need to be able to show each distribution paid a qualified medical expense that wasn't reimbursed elsewhere and wasn't also taken as an itemized deduction. A folder of Medicare Summary Notices and premium statements does the job.
A Florida note: the Florida Department of Revenue says Florida does not impose a personal income tax, so for state income tax there's nothing extra to file. The federal rules above are the whole picture for your HSA's income-tax treatment as a Florida resident (Florida Department of Revenue FAQ).
What I'd do, in order
- Pick your Medicare start month first. Medicare and Part B timing drive everything else; the HSA follows. If you'll claim Social Security, that's effectively your Medicare date too.
- Count back six months from the month you'll apply. That's the earliest month Part A can start, unless it lands before the month you turn 65, in which case Part A starts the month you turn 65. Stop your own and your employer's HSA contributions as of whichever month Part A would start.
- Prorate the final year. Annual limit (plus $1,000 if you're 55+) × eligible months ÷ 12. Compare it with what's already gone in through payroll.
- Remove any excess with its earnings before your return is due, including extensions, and tell payroll.
- Keep the HSA. Use it for Part B, Part D or Medicare Advantage premiums and your out-of-pocket costs, not Medigap premiums.
- Check your spouse's position: their own eligibility, their own catch-up, and whether their family HDHP still lets them contribute.
HSA rules are tax law, and your numbers depend on your own coverage, payroll records and filing status. Confirm your limit and any corrective withdrawal with a tax professional before you act.
Your own plan documents, Medicare notices and federal law control your situation. Confirm the details with a licensed agent, SHINE, Social Security or 1-800-MEDICARE, and talk to an attorney for legal questions.
Sources
- IRS Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans (for 2025 returns)
- IRS Rev. Proc. 2025-19: 2026 HSA inflation-adjusted amounts
- IRS Rev. Proc. 2026-24: 2027 HSA inflation-adjusted amounts
- 26 U.S.C. 223: Health savings accounts (via Cornell LII)
- IRS Notice 2004-50: HSA questions and answers
- IRS Notice 2008-59: HSA questions and answers
- Medicare.gov: When does Medicare coverage start?
- Medicare.gov: Working past 65
- Medicare.gov: How do I sign up for Medicare?
- Medicare.gov: Avoid late enrollment penalties
- Social Security POMS HI 00801.002: Waiver of HI entitlement by monthly beneficiary
- Florida Department of Revenue: Do I have to file a personal income tax return in Florida?
- Florida Department of Elder Affairs: SHINE
This article is for general educational purposes only and is not legal, tax or insurance advice. Coverage depends on the actual policy, its terms, conditions and exclusions, and state law. Maru Insurance · WA License (WAOIC) #1365574 · FL License #G363233 · NPN 22261820.