If you delay Medicare and keep contributing to a Health Savings Account, the “6-month lookback rule” can create excess HSA contributions you did not expect. This guide explains the 2025 HSA limits, why retroactive Medicare Part A coverage matters, how the penalty works, and what to do before you apply for Medicare or Social Security.
Quick takeaways
- For 2025, the HSA contribution limit is $4,300 for self-only HDHP coverage and $8,550 for family HDHP coverage. If you are age 55 or older and otherwise eligible, you can generally add a $1,000 catch-up contribution.
- Beginning with the first month you are enrolled in Medicare, your HSA contribution limit is generally zero for that month and later months. The IRS says this rule also applies to retroactive Medicare coverage.
- For many people over 65, premium-free Medicare Part A starts up to 6 months before the month they apply for Medicare or Social Security, but not earlier than the first month they were eligible for Medicare. That retroactive start date is what creates the “lookback” issue.
- If you contribute during a retroactive Medicare coverage period, those amounts are generally treated as excess HSA contributions. Excess contributions are generally subject to a 6% excise tax for each year they remain in the HSA, unless corrected in time.
- You can usually avoid the 6% excise tax on the withdrawn excess if you remove the excess contribution and related earnings by the tax return due date, including extensions.
Who this applies to
This article applies to individual taxpayers with an HSA who are approaching or already past age 65, especially those planning to enroll in Medicare Part A, apply for Social Security retirement benefits, or use a Special Enrollment Period after staying on employer coverage. It affects employees, retirees, and self-employed taxpayers because the Medicare enrollment rule applies at the individual level, even if contributions came through payroll, an employer, or your own tax-deductible contributions. This article is federal-focused. State tax treatment may differ.
Introduction
The HSA-Medicare issue catches many people because two systems are colliding:
- HSA rules require you to be an eligible individual to contribute, and
- Medicare enrollment can begin earlier than many people expect because of retroactive Part A coverage.
The result is simple but costly: you may think you were HSA-eligible up to the date you filed for Medicare or Social Security, but Medicare Part A may start months earlier, making some of your later HSA contributions excess contributions. For tax year 2025, that can lead to amended contribution calculations, Form 8889 reporting, and possibly Form 5329 penalty exposure.
This article explains the federal rules for 2025 returns filed in 2026. It is educational only and is not personal tax, legal, or Medicare enrollment advice. Facts and timing matter.
What the 6-month lookback rule is
People often call this the “Medicare 6-month lookback rule” for HSAs. In practical terms, it refers to the fact that premium-free Medicare Part A can start up to 6 months before the month you apply for Medicare or Social Security, if you are over 65. That retroactive start date can make you ineligible to contribute to an HSA for months when you thought you were still eligible.
The Medicare booklet says:
- premium-free Part A coverage begins 6 months back from the date you apply for Medicare or Social Security/RRB benefits,
- but no earlier than the first month you were eligible for Medicare, and
- to avoid a tax penalty, you should stop contributing to your HSA at least 6 months before you apply.
That is the core rule most taxpayers need to understand.
Why Medicare affects HSA eligibility
To contribute to an HSA, you must be an eligible individual. The IRS says an eligible individual must be covered by an HDHP, have no disqualifying other coverage except certain disregarded coverage, and cannot be enrolled in Medicare.
Publication 969 makes the rule even more direct: beginning with the first month you are enrolled in Medicare, your contribution limit is zero. The IRS also says this applies to periods of retroactive Medicare coverage, so HSA contributions made during the retroactive period are considered excess contributions.
This is why the timing problem is so common. Medicare and Social Security timing can change your HSA contribution limit after the fact.
When the problem usually starts
For many taxpayers, the issue starts in one of these situations:
You apply for Social Security after age 65
The Social Security Administration says that if you are age 65 or older and receive Social Security benefits, you will be automatically enrolled in Part A. SSA also says Part A coverage begins up to 6 months before the month you apply if you are over 65.
So if you keep contributing to your HSA and then later file for Social Security retirement benefits, your Part A start date may be pushed back and retroactively wipe out some of your HSA eligibility.
You enroll in Medicare Part A after delaying it
The Medicare enrollment booklet says if you have an HSA and want to keep contributing, you should not apply for Medicare, Social Security, or Railroad Retirement benefits until you are ready to stop HSA contributions. It specifically warns that your enrollment date will generally be 6 months before your application date, so you must stop contributing 6 months before applying for Medicare.
You delay Medicare because you have employer coverage
Many people over 65 keep an employer group health plan and delay Medicare. That can be fine for Medicare timing, but it does not erase the Part A retroactive issue once you later apply. The Medicare booklet notes that if you qualify for a Special Enrollment Period and wait to enroll, you may still need to stop HSA contributions 6 months before applying.
2025 HSA contribution limits
For calendar year 2025, IRS Revenue Procedure 2024-25 sets the HSA contribution limits at:
- $4,300 for self-only HDHP coverage
- $8,550 for family HDHP coverage.
The IRS also says if you are age 55 or older at the end of the tax year, your contribution limit is generally increased by $1,000. Publication 969 gives the example that a taxpayer age 55 or older with self-only coverage can contribute up to $5,300 in 2025 if otherwise eligible.
2025 HDHP thresholds
For 2025, an HDHP is defined as a plan with:
- a minimum deductible of $1,650 for self-only coverage or $3,300 for family coverage, and
- maximum out-of-pocket expenses of $8,300 for self-only coverage or $16,600 for family coverage.
These thresholds matter because you must have qualifying HDHP coverage in the first place before the Medicare issue even comes into play.
How the limit is reduced when Medicare starts during the year
If you are not HSA-eligible for the full year, your contribution limit is generally reduced to reflect only the months you were eligible. The IRS says you must be an eligible individual on the first day of a month to take an HSA deduction for that month.
Publication 969 gives a 2025 example: if you turn age 65 in July 2025, enroll in Medicare, have self-only HDHP coverage, and qualify for the $1,000 catch-up, your contribution limit is $2,650, which is $5,300 × 6 ÷ 12. That example shows how the catch-up amount is prorated along with the base limit when Medicare starts midyear.
So the issue is not just “stop contributing after Medicare starts.” It is also “recalculate the annual limit correctly.”
What the penalty is if you contribute too much
If your HSA contributions for the year exceed the allowed limit, the IRS says you have an excess contribution. Excess contributions are not deductible. If employer excess contributions were not already included in wages, you may also have to report them as income.
The main penalty is the 6% excise tax. Publication 969 says:
- you generally must pay a 6% excise tax on excess contributions,
- the tax is figured on Form 5329, and
- it applies to each tax year the excess remains in the account.
That is the penalty most people mean when they talk about “the HSA Medicare penalty.”
How to fix an excess contribution
The IRS says you may withdraw some or all of the excess contribution and avoid the 6% excise tax on the withdrawn amount if you do both of these things:
- withdraw the excess by the due date of your return, including extensions, and
- withdraw any income earned on the excess and include those earnings in income.
If you miss that correction window, the excess can keep triggering the 6% excise tax for later years until properly resolved.
Forms involved
The main federal forms are:
- Form 8889, to report HSA contributions, deductions, distributions, and certain additional tax situations, and
- Form 5329, to figure the excise tax on excess contributions.
The IRS says you must file Form 8889 if you, your employer, or someone else contributed to your HSA, if your HSA made a distribution, or if you failed the testing period and must recognize income.
Don’t confuse the Medicare lookback rule with the HSA last-month rule
There is another HSA rule that causes confusion: the last-month rule. Under that rule, if you are an eligible individual on December 1, 2025, you may be treated as eligible for the full year, but only if you satisfy a later testing period. If you fail that testing period for reasons other than death or disability, the IRS says the excess amount becomes income and is also subject to a 10% additional tax.
That is a different rule from the Medicare lookback problem.
- Medicare retroactive enrollment usually creates excess contributions and possible 6% excise tax.
- Last-month rule failures can create income inclusion and a 10% additional tax under Form 8889 Part III.
If both rules are in play, the calculations can get more complicated.
How this affects employees vs. self-employed taxpayers
This rule applies to the individual account beneficiary, not just to one type of worker. That means:
- employees making payroll HSA contributions can run into this problem,
- self-employed taxpayers deducting their own HSA contributions can run into it too, and
- the issue can arise whether contributions came from you, your employer, or another person on your behalf.
So while business entity choice is usually not the main issue here, the federal Medicare enrollment rule still matters for sole proprietors, freelancers, and other self-employed people using an HSA. It is an individual eligibility rule.
Common mistakes
Here are the most common errors taxpayers make:
- Waiting until the month they apply for Medicare to stop HSA contributions instead of stopping about 6 months earlier.
- Assuming employer coverage after age 65 means there is no Medicare issue later.
- Forgetting that retroactive Part A coverage can make earlier contributions excess.
- Missing the catch-up contribution proration when Medicare starts midyear.
- Confusing the 6% excess contribution excise tax with the 10% last-month-rule testing period tax.
Myth vs. fact
Myth: I can contribute to my HSA until the day I file for Medicare. Fact: Usually no. If premium-free Part A is retroactive, the IRS and Medicare materials indicate you may need to stop contributing at least 6 months before applying to avoid excess contributions and possible penalty exposure.
Federal timing for 2025 returns filed in 2026
For most calendar-year taxpayers, HSA contributions for 2025 can generally be made until the unextended federal filing deadline, which for 2025 returns is April 15, 2026. The Form 8889 instructions specifically say 2025 contributions made in 2026 by that deadline can count for 2025.
If you need extra time to file the return itself, you can generally request an extension to October 15, 2026. That also matters because Publication 969 allows correction of excess contributions by the due date including extensions.
State tax note
This article is about federal HSA and Medicare rules. State treatment can differ. For example, California does not conform to the federal HSA rules. California’s official summary of federal tax changes specifically states that California does not conform to federal Health Savings Accounts.
So even if your federal HSA contribution or correction is handled properly, your state return may not follow the same treatment.
When to get professional help
You should consider working with a CPA, EA, or tax attorney if any of these apply:
- you are over 65 and plan to apply for Social Security soon,
- you are using an employer plan and delaying Medicare,
- you already made 2025 HSA contributions and later discovered retroactive Medicare Part A coverage,
- you need to correct excess contributions and calculate earnings,
- or you live in a state with nonconforming HSA rules, such as California.
These are fact-sensitive timing questions, and the cost of getting them wrong can be recurring.
Bottom line
For 2025, the federal HSA limits are $4,300 for self-only coverage and $8,550 for family coverage, plus a $1,000 catch-up for eligible taxpayers age 55 or older. But once you are enrolled in Medicare, your HSA contribution limit generally becomes zero starting with that month, and the IRS says this includes retroactive Medicare coverage. Because premium-free Part A can begin up to 6 months before you apply, taxpayers who delay Medicare or Social Security often need to stop HSA contributions well before the application date. Contributions during the retroactive period are generally excess contributions, and if not corrected in time, they can trigger a 6% excise tax for each year they remain in the HSA.
What to do next
- If you plan to apply for Medicare or Social Security after age 65, review the likely Part A start date before making more HSA contributions.
- Recalculate your 2025 HSA limit month by month if Medicare coverage started during the year or was later backdated.
- If you made excess contributions, ask your HSA custodian about a timely corrective distribution of the excess and related earnings.
- Use Form 8889 and, if needed, Form 5329 to report the contribution, correction, and any excise tax.
- If your timing is complicated or your state does not fully conform, get help from a CPA or EA before filing your 2025 return.
Source note: Sources consulted: IRS Publication 969, IRS Form 8889 instructions, IRS inflation-adjustment guidance, Medicare enrollment materials, and official SSA/Medicare guidance.