Blog

If I enroll in Medicare after 65, how does Part A backdating change my HSA?

A worksheet for HSA holders who delay Medicare: how up to six months of retroactive Part A shortens the contribution year, with a worked example and blanks.

If you are 65 or older, still working, and contributing to a health savings account, the day you sign up for Medicare is not the day your HSA contributions have to stop. When you enroll in premium-free Part A after you became eligible, Part A can start up to six months earlier than your application, and the HSA rules look at the month Part A starts. Contributions made for those earlier months can become excess contributions. The practical result is that your last safe contribution month can be up to six months before the month you apply.

This is a worksheet. It explains the backdating rule, gives a worked example with a prorated limit, lists the steps with blanks for your own dates and says where a tax professional is the right person. The dollar amounts in the example are invented, except where a published IRS figure is cited with its year. The dates are illustrations. For the limit that applies to you, and for any question about what you can contribute, a tax professional is the person to ask, because HSA eligibility depends on facts about your coverage that this post cannot see.

The three rules that interact

1. Part A can be retroactive. Medicare Part A is premium-free for most people who have worked about ten years in Medicare-covered jobs. If you apply for it after you were first eligible, coverage generally starts up to six months before the month you apply, but not earlier than the first month you were eligible, which is generally the month you turned 65. Say your eligibility started in March 2027. If you apply in October 2027, Part A can start in April 2027, six months back. If you apply in May 2027, it can start only in March, two months back, because you were not eligible before March.

Part B works differently. Part B generally starts the month after you sign up and is not backdated in ordinary enrollment, so the backdating worry is about Part A. The same bundle can still pull you out of HSA eligibility, because an HSA requires that you not be enrolled in Medicare at all, in either part.

2. HSA contributions require that you are not enrolled in Medicare. HSA contributions are allowed only for months when you are covered by an HSA-eligible high-deductible plan and have no disqualifying coverage. Medicare Part A or Part B enrollment is disqualifying. You can still spend what is already in the account tax-free on qualified medical expenses, including Medicare premiums for Part B, Part D and Medicare Advantage, though not for Medigap. What ends is the ability to add new money for months you are enrolled.

3. The limit is prorated by month. The annual HSA limit is spread across the months you are eligible. The HSA limit for 2026 is $4,400 self-only and $8,750 family, and for 2027 it is $4,500 self-only and $9,000 family, according to IRS Rev. Proc. 2025-19 and Rev. Proc. 2026-24. People 55 and older can add a $1,000 catch-up contribution, which is also prorated. Employer contributions count toward the limit. The related guide is HSAs and Medicare: when you must stop contributing, and the definition of the limit itself is at HSA contribution limit.

When these three rules meet, the result is straightforward: the months from Part A's start date to the end of the year are not eligible months, and Part A's start date can be earlier than your application date.

Why the "stop six months early" advice exists

A common instruction is to stop HSA contributions at least six months before you apply for Medicare or for Social Security retirement benefits. The advice exists because applying for Social Security benefits after age 65 generally also enrolls you in Part A, and because Part A backdates. If you stop six months early, there is no way for backdating to reach a month in which you contributed.

Whether you need to stop earlier depends on how you apply.

The worksheet

Work through these steps with your own dates. Use the blanks.

  1. The month I turned 65, or the first month I was eligible for Medicare. (If your birthday is the first of a month, eligibility may begin the month before; see Why does Medicare start a month early if my birthday is on the first?.) Month: ______
  2. The month I plan to apply for Medicare or Social Security. Month: ______
  3. Six months before step 2. Month: ______
  4. Part A start month. The later of step 1 and step 3. Month: ______
  5. Eligible HSA months this year. The number of months from January up to, but not including, the Part A start month. Count: ______
  6. Annual limit for my coverage type and year. From the IRS or your tax professional: $______
  7. Monthly share. Step 6 divided by 12: $______
  8. Prorated limit. Step 7 times step 5: $______
  9. Catch-up, if I am 55 or older. $1,000 divided by 12, times step 5: $______
  10. My total allowed this year. Step 8 plus step 9: $______
  11. What has already gone in this year, by me and by my employer: $______
  12. Difference. Step 11 minus step 10. A positive number is an excess, and a negative number is room left: $______

If step 12 is positive, ask a tax professional how to correct the excess. In general, an excess can be withdrawn, with its earnings, by the tax filing deadline for the year, and an excess left in the account is subject to a 6% excise tax each year it stays.

A worked example

This example uses invented dates and the real 2027 self-only limit.

Say Pat, born March 12, 1962, turns 65 on March 12, 2027. Pat has an HSA-eligible plan through work and contributes $400 a month. Pat has no employer contribution. Pat applies for Social Security retirement benefits and Medicare in October 2027.

  1. First eligible month: March 2027.
  2. Application month: October 2027.
  3. Six months before October: April 2027.
  4. Part A start month: the later of March and April, which is April 2027.
  5. Eligible HSA months: January, February and March, which is 3.
  6. Annual limit: $4,500, the 2027 self-only limit.
  7. Monthly share: $4,500 divided by 12 is $375.
  8. Prorated limit: $375 times 3 is $1,125.
  9. Catch-up: Pat is over 55, so $1,000 divided by 12 is $83.33, and times 3 is about $250.
  10. Total allowed: $1,125 plus $250 is $1,375.
  11. Contributions so far: January through September at $400 a month, which is $400 times 9, or $3,600.
  12. Difference: $3,600 minus $1,375 is $2,225 in excess.

The excess is the money contributed for April through September, plus the part of the first three months that went above the prorated limit. Pat's contributions of $400 a month were within the monthly limit through March ($1,200 for three months, under the $1,375), so the excess is the $2,400 contributed for April to September ($400 times 6), less the $175 of headroom left in the first three months ($1,375 minus $1,200). Check: $2,400 minus $175 is $2,225. The two ways of counting agree.

Now compare a planned version. Say Pat had known in January 2027 that the application would be in October and had stopped contributing after March. The contributions would have been $1,200, which is under the allowed $1,375, with no excess. The six-month planning rule is the same arithmetic done in advance.

A second case: starting from a planned date

Say Dana turns 65 in June 2027 and wants to keep an HSA going as long as she can. She plans to apply for Medicare in December 2027.

  • Six months before December is June 2027.
  • She turned 65 in June 2027, so the first eligible month is also June.
  • Part A start month: June 2027.
  • Eligible HSA months: January through May, which is 5.
  • Prorated limit without catch-up: $375 times 5 is $1,875.

If instead Dana had applied in August 2027, six months back would be February 2027, and Part A could start in February or in her first eligible month, whichever is later. Since she was not eligible until June, the start would be June: backdating cannot go before eligibility. The earlier the application, the closer the start date is to the eligibility month, and the later the application, the more the six-month look-back controls.

Three ways this goes wrong

  • Counting from the sign-up date. The most common error is treating the application month as the last eligible month. The last eligible month is the one before Part A starts, which can be up to six months earlier.
  • Forgetting the employer's share. Payroll contributions made by the employer count toward the same annual limit. A person who contributes nothing personally can still have an excess if the employer has been funding the account.
  • Letting automatic contributions run. Payroll deductions to an HSA continue until you change them. If your application date is approaching, ask payroll to stop the deductions in time, using the date from step 3 of the worksheet and not the date of your application.

A short call to the plan administrator, or a message to payroll, resolves the second and third; the first is solved by the worksheet.

What the worksheet does not decide

  • Whether you are HSA-eligible in other ways. Other health coverage, such as a general-purpose health FSA of your spouse's, can disqualify you in months the worksheet counts as eligible. See My spouse has a general-purpose FSA, can I still contribute to my HSA?.
  • Family coverage. A spouse who is not on Medicare has their own eligibility, and how a family limit is divided or used depends on your coverage and your filing. A tax professional is the right person.
  • Part-year ages. The catch-up contribution depends on your age at year end, not on a specific date.
  • Rules that may change. The limits and the proration are for plan years 2026 and 2027 as published by the IRS. Check the current figures.
  • Your actual start date. Social Security or Medicare sets Part A's start date on your application. Ask what it will be before you send it, and use the answer for step 4.

The online tool HSA contribution and tax savings calculator can check the monthly arithmetic. Your plan administrator or the account custodian may also know which contributions have posted.

When to see a tax professional

Go to one if the worksheet shows an excess, if you are on a family plan with a spouse who is also eligible or if your employer contributes. Go before you apply for Social Security or Medicare, not after, because the application date is what sets the limits. A professional can confirm the limit that applies to you, how to remove an excess and how the contributions will be reported on your return.

Key takeaways

  • Premium-free Part A can start up to six months before the month you apply, but not before you were first eligible, so the HSA contribution year can end earlier than the application date.
  • Medicare enrollment in either part ends the ability to add to an HSA; money already in the account stays usable tax-free for qualified expenses.
  • The limit is prorated by month, using 12 as the divisor: at the 2027 self-only limit of $4,500, each eligible month is worth $375, plus one twelfth of the $1,000 catch-up if you are 55 or older.
  • In the example, applying in October 2027 meant Part A started in April, three eligible months and a $2,225 excess for a person who had kept contributing $400 a month.
  • Stopping at least six months before you apply for Medicare or Social Security keeps backdating from reaching contributed months.
  • A tax professional confirms the limit, the correction for any excess and the rules for family coverage.

Terms used in this guide

Related tools

Related guides

Latest on this topic