Americans who continue depositing money into a health savings account after enrolling in Medicare face a 6% excise tax on every dollar contributed while ineligible, a penalty that compounds for each year the excess funds remain in the account. The rule catches many people off guard because Medicare Part A coverage can apply retroactively for up to six months, turning contributions that seemed legal at the time into taxable excess. Three federal agencies, the IRS, the Centers for Medicare and Medicaid Services, and the Social Security Administration, all warn about this trap, yet no public data shows how many taxpayers get caught by it each year.
Why the Medicare-HSA cutoff catches workers near 65
The collision between Medicare enrollment and HSA eligibility is not a gray area. Federal statute defines an “eligible individual” for HSA purposes and specifies that a person who is entitled to Medicare benefits can no longer contribute. The IRS reinforced this in early guidance, clarifying that mere eligibility for Medicare does not trigger the ban. Only actual enrollment does. That distinction matters for workers past 65 who have not yet signed up for Part A.
The real problem surfaces when those workers finally do enroll. If someone files for Part A more than six months after turning 65, coverage can be retroactive for six months, according to CMS enrollment rules. Any HSA deposits made during that retroactive window become excess contributions after the fact, even though the account holder had no Medicare card in hand when the money went in.
That retroactive reach is why CMS training materials aimed at employers tell workers to stop HSA contributions six months before applying for Medicare. The Social Security Administration echoes the same caution, stating that contributing to an HSA after Medicare coverage begins may result in additional taxes. The penalty is not a one-time hit. Under IRS procedures, the 6% excise tax applies for the year of the excess contribution and again for each subsequent year the money stays in the account. Taxpayers must report the overage on Form 5329.
Statutory rules and the 6% excise tax on excess HSA deposits
The penalty mechanism runs through two sections of the tax code. The eligibility bar comes from 26 U.S.C. Section 223, which ties HSA contribution rights to not being entitled to Medicare benefits. The financial consequence comes from Section 4973, which imposes the 6% excise tax on excess contributions to health savings accounts and certain other tax-favored accounts.
IRS guidance in Publication 969 for 2025 lays out the practical sequence: once enrolled in Medicare, an individual cannot contribute to an HSA. If enrollment triggers retroactive Part A coverage, contributions made during that lookback period become excess. The instructions for Form 8889 confirm that Section 4973 governs the penalty calculation, and the Internal Revenue Manual explains that the excise continues each year until the excess is removed or otherwise corrected under the statute.
The IRS first addressed this interaction shortly after HSAs were created. In early administrative guidance, the agency distinguished between mere eligibility for Medicare and actual entitlement. The document emphasized that a person who delays enrollment and remains covered by a qualifying high-deductible plan can keep contributing to an HSA. That assurance encouraged many older workers to keep funding their accounts while staying on employer coverage, but it also set the stage for confusion once they eventually claim Medicare.
How excess HSA contributions are calculated and corrected
The IRS applies the 6% excise tax to the total amount of excess contributions remaining in the HSA at the end of each tax year. For someone who enrolls in Medicare midyear, the annual contribution limit is effectively prorated based on the number of months before entitlement begins. Any amounts deposited for months after entitlement, including months covered by retroactive Part A, are treated as excess unless a timely correction is made.
Taxpayers can avoid or limit the excise tax if they act quickly. The tax code allows an account holder to withdraw excess contributions and any earnings on those contributions by the tax filing deadline, including extensions, for the year in question. When handled correctly, the withdrawn excess is not subject to the 6% excise tax, though the earnings may be taxable as income. If the excess is not removed by the deadline, the excise applies and continues in later years until the balance of excess contributions is reduced to zero.
For people who discover the issue years after enrolling in Medicare, the cleanup can be more complex. They may need to file or amend multiple years of Form 5329 to report the excise tax and work with their HSA custodian to identify which deposits were made after Medicare entitlement. Because the statute applies the 6% rate annually on the remaining excess, the cumulative cost can be significant, especially for high-income workers who maximized contributions in their late 60s.
Planning ahead to avoid the Medicare-HSA penalty
Despite the lack of public statistics on how often this problem arises, the consistent warnings from CMS, the Social Security Administration, and the IRS indicate that it is common enough to merit proactive planning. Workers approaching 65 who want to delay Medicare enrollment should confirm that their employer coverage remains HSA-eligible and understand that once they file for Social Security benefits, Medicare Part A enrollment may be automatic and retroactive.
Financial planners often advise clients to stop HSA contributions several months before any anticipated Medicare start date and to coordinate with payroll or benefits departments to avoid inadvertent deposits. For those who have already enrolled and suspect they may have contributed afterward, reviewing contribution records and seeking tax advice early can reduce the risk of mounting excise taxes. While the rules are technical, the core message is straightforward: once Medicare entitlement begins, even retroactively, new HSA contributions become a liability rather than a tax break.
Free for readers: The free Retirement Shield newsletter sends plain-English help keeping more of your money in retirement — the scams to dodge, the benefits you’re owed, and what’s changing with Social Security and Medicare, a couple times a week. Get the free newsletter.