Contributing to an HSA after 65 is allowed only if you have not enrolled in any part of Medicare. The moment Medicare coverage begins — Part A, B, C, or D — your HSA contribution limit drops to zero, and anything you put in after that point becomes an excess contribution subject to a 6% excise tax for every year it stays in the account.1Office of the Law Revision Counsel. 26 USC 223 Health Savings Accounts2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Turning 65 Isn’t the Trigger — Medicare Is
Federal tax law ties HSA eligibility to your health coverage, not your birthday. If you are still working past 65, still covered by a qualifying high deductible health plan, and have not enrolled in Medicare or claimed Social Security, you can keep contributing.
The catch is that Medicare enrollment is often automatic. Anyone collecting Social Security retirement benefits is enrolled in premium-free Part A with no opt-out.3Social Security Administration. When to Sign Up for Medicare That automatic Part A ends HSA contribution eligibility immediately, even if your employer’s HDHP is still your primary coverage. Part A coverage generally starts on the first day of the month you turn 65.4Medicare.gov. When Does Medicare Coverage Start
So the planning question for anyone working past 65 is simple: do you want to keep contributing to your HSA, or do you want to start Social Security? You cannot do both.
The Six-Month Retroactive Part A Trap
This is the rule that catches people who thought they were being careful. When you apply for Medicare Part A more than six months after turning 65, your coverage is backdated up to six months from your application date.5Centers for Medicare & Medicaid Services. Original Medicare (Part A and B) Eligibility and Enrollment Any HSA contributions made during those retroactive months become excess contributions, even though you had a qualifying HDHP the whole time.
An example: you turn 65 in March, keep working with HDHP coverage, and contribute every paycheck. In November you retire and enroll in Medicare. Part A gets backdated six months to May 1. Every contribution from May through November is now excess and subject to the 6% tax.
The same lookback applies when you claim Social Security, since that triggers automatic Part A. The practical rule is to stop HSA contributions at least six months before you plan to enroll in Medicare or file for Social Security. If contributions run through payroll, tell HR early; payroll systems don’t always change immediately.
Prorating Your Contribution Limit for the Year Medicare Starts
In the year Medicare coverage begins mid-year, your annual limit is prorated based on the months you were HSA-eligible. Eligibility is measured on the first day of each month.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
For 2026, the full annual limits are $4,400 for self-only HDHP coverage and $8,750 for family coverage.6Internal Revenue Service. Revenue Procedure 2025-19, 2026 Inflation Adjusted Amounts for Health Savings Accounts Anyone 55 or older can add a $1,000 catch-up contribution, and the catch-up is prorated on the same schedule as the base limit.1Office of the Law Revision Counsel. 26 USC 223 Health Savings Accounts
The math: divide the full annual limit (base plus catch-up, if applicable) by 12, then multiply by the number of eligible months. Say you have self-only coverage, you’re 66, and Part A begins July 1, 2026. You were eligible January through June — six months. Your prorated cap is 6/12 of ($4,400 + $1,000), or $2,700. Anything above $2,700 is excess. Factor in the six-month lookback before you count months; it can shrink your eligible window further than the enrollment date alone suggests.
What the 6% Excise Tax Actually Costs
The 6% excise tax applies to any excess HSA contribution and repeats every year the excess remains in the account.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans A $3,000 excess left untouched for three years generates $540 in penalties on its own.
The excess amount also isn’t deductible. If you already deducted it, that has to be corrected. If it came through payroll on a pre-tax basis, the excess portion becomes taxable wages for the year.
Fixing It Before the Filing Deadline
You can avoid the 6% penalty for a given year by withdrawing the excess plus any earnings on it before your tax filing deadline, including extensions.7Internal Revenue Service. Instructions for Form 8889 (2025) The earnings portion is reported as income on that year’s return. Your HSA custodian will issue a Form 1099-SA with distribution code 2 to flag the corrective withdrawal.8Internal Revenue Service. Instructions for Forms 1099-SA and 5498-SA
Fixing It After You’ve Already Filed
If you filed without correcting the excess, there’s still a window. The IRS allows withdrawal of excess contributions up to six months after the filing deadline (excluding extensions), followed by an amended return marked “Filed pursuant to section 301.9100-2” at the top.7Internal Revenue Service. Instructions for Form 8889 (2025) Attach an updated Form 5329, which calculates the excise tax.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Miss both windows and the 6% tax hits for that year and every subsequent year until the money comes out. The IRS treats it as an ongoing violation with no statute of limitations.
Using the HSA Balance You Already Have
Medicare enrollment stops new contributions. It doesn’t touch existing balances. The money keeps growing tax-free and can be withdrawn for qualified medical expenses tax-free, with no deadline and no requirement to close the account.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Once you’re 65 or older, HSA funds can pay premiums for Medicare Part A (when a premium applies), Part B, Part D, and Medicare Advantage. One category is explicitly excluded: Medicare Supplement policies, known as Medigap.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans HSA funds can also cover COBRA premiums and long-term care insurance premiums up to age-based annual limits. Ordinary qualified expenses — deductibles, copays, prescriptions, dental, vision — apply as they always did.
Non-medical withdrawals work differently after 65. The 20% additional tax on non-medical distributions goes away; the amount is still taxed as ordinary income, similar to a traditional IRA distribution.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Can You Undo Medicare to Restart Contributions?
Sometimes, and only expensively. If you claimed Social Security without realizing the effect on your HSA, you can withdraw the Social Security application within 12 months of the initial approval by filing Form SSA-521. That form includes an option to disenroll from Medicare, which restores HSA eligibility from the month after Medicare coverage ends — not retroactively for months you were enrolled.
The price is full repayment: every dollar of Social Security benefits received, all Medicare Part A benefits paid on your behalf, and any Part B premiums or tax withholding. If you had significant Medicare claims during that period, the repayment can dwarf the Social Security checks. The option is realistic only for someone who catches the mistake fast and used little to no Medicare care in the meantime.