CrowdfundedWealth
Articles · Research note

HSA and Medicare: The Six-Month Lookback and 2027 Limits

By Jorge··19 min read

Some links pay us a referral fee; each one says so. Disclosure

Quick Answer

If you apply for Medicare Part A or for Social Security after you turn 65, premium-free Part A starts up to six months back, and your HSA contribution limit is zero for every month from that start, so the last month you can contribute is seven months before the month you apply: apply in July 2027 and December 2026 is your last contributing month (our arithmetic). As of October 22, 2026, Rev. Proc. 2026-24 sets the 2027 HSA limits at $4,500 for self-only and $9,000 for family coverage, and the age 55 catch-up stays $1,000 because the statute fixes it. Money put in during a backdated month is an excess contribution, taxed at 6 percent a year while it stays in the account (26 U.S.C. 4973), and after 65 an HSA can pay Medicare Part A, B, D and Medicare Advantage premiums but not Medigap.

Key Takeaways

  • Medicare.gov says: “Your Part A coverage starts 6 months back from when you sign up or when you apply for benefits from Social Security (or the Railroad Retirement Board). Coverage can’t start earlier than the month you turned 65.” Section 223(b)(7) makes the HSA limit zero “for the first month such individual is entitled to benefits under title XVIII of the Social Security Act and for each month thereafter.” Together, the backdating reaches contributions you made before you applied.
  • The last month you can contribute is the application month minus seven (our arithmetic): the Part A start is the application month minus six, and the limit is zero from that month. An application in October 2027 means March 2027 is the last month; in January 2027, June 2026. If you turned 65 less than six months before applying, the floor is the month you turned 65 instead.
  • The limit for a part year is prorated by month. IRS Publication 969 gives the example of a person who turned 65 in July 2025 and had Medicare from then: $5,300 x 6 / 12 = $2,650. For 2027 a self-only holder aged 55 or older has $5,500 a year, so five eligible months give $2,291.67 (our arithmetic).
  • The 2027 limits in Rev. Proc. 2026-24 are $4,500 self-only and $9,000 family, up from $4,400 and $8,750 for 2026 (Rev. Proc. 2025-19) and $4,300 and $8,550 for 2025 (Publication 969). The high deductible plan minimum deductible rises to $1,750 and $3,500, and the out-of-pocket maximum to $8,700 and $17,400.
  • Excess contributions are taxed at 6 percent for each year they remain (Section 4973(a)(5)). Publication 969 lets you avoid the tax on an amount you withdraw, with its earnings, by the due date of the return including extensions. Contributions made during a backdated month count as excess: “any contributions to your HSA made during the period of retroactive coverage are considered excess.”
  • After the Medicare age an HSA can pay “any health insurance other than a medicare supplemental policy” (Section 223(d)(2)(C)(iv)), so Part B, Part D and Medicare Advantage premiums qualify and Medigap does not. The 20 percent additional tax on non-medical withdrawals does not apply after that age, though ordinary income tax does (Section 223(f)(4)(C)).
  • As of October 22, 2026 the IRS had published the 2027 HSA limits but we found no 2027 Medicare Part B premium or IRMAA table yet; both are normally announced in the fall.

CSV · 149 rows

HSA limits for 2025 to 2027, the Medicare retroactive-coverage rule and the last month to contribute

149 rows: the HSA contribution and high deductible plan limits for 2025, 2026 and 2027 from the IRS, the statute and Publication 969 rules on Medicare and excess contributions, the Medicare.gov and 42 CFR 406.6 retroactive Part A rule, our month-by-month calendar for applications from October 2026 to December 2027, birthday cases and the list of premiums an HSA can pay after 65. The downloaded sources are saved with the page.

The rule, in the documents

Two separate rules combine, and the trap sits in the gap between them.

The first is about the HSA. Section 223(b)(7) of the Internal Revenue Code says the limit “for any month with respect to an individual shall be zero for the first month such individual is entitled to benefits under title XVIII of the Social Security Act and for each month thereafter.” Publication 969 lists the entry test in plain words: to qualify for an HSA contribution, “You aren’t enrolled in Medicare.” It adds that the zero reaches back: “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.”

The second is about Medicare. For premium-free Part A, Medicare.gov says: “You can sign up for Part A any time after you turn 65. Your Part A coverage starts 6 months back from when you sign up or when you apply for benefits from Social Security (or the Railroad Retirement Board). Coverage can’t start earlier than the month you turned 65.” The regulation behind it is 42 CFR 406.6(d)(4): an application that is validly filed within 6 months after the first month of eligibility is retroactive to that first month, and “If filed more than 6 months after that first month, it is retroactive to the 6th month before the month of filing.” Under 42 CFR 406.6(b), a person who is entitled to monthly Social Security benefits when reaching 65 does not need to apply for Part A at all; it starts on its own.

So the date that starts the HSA clock is not the day you sign the form. It is the first day of a month up to six months earlier. Because the limit is monthly, the first zero month is the start month, and the last month you could contribute is the one before it.

The last month to contribute, by application month

The table assumes you turned 65 at least six months before you apply, you have premium-free Part A, and you are 55 or older with self-only high deductible coverage. “Application” means the month you apply for Part A or for Social Security, whichever is first. Everything in it is our arithmetic from the two rules above.

Month you applyPart A can startLast month you can contributeEligible months in 20262026 limit, proratedEligible months in 20272027 limit, prorated
October 2026April 2026March 20263$1,350.000$0
November 2026May 2026April 20264$1,800.000$0
December 2026June 2026May 20265$2,250.000$0
January 2027July 2026June 20266$2,700.000$0
February 2027August 2026July 20267$3,150.000$0
March 2027September 2026August 20268$3,600.000$0
April 2027October 2026September 20269$4,050.000$0
May 2027November 2026October 202610$4,500.000$0
June 2027December 2026November 202611$4,950.000$0
July 2027January 2027December 202612$5,400.000$0
August 2027February 2027January 202712$5,400.001$458.33
September 2027March 2027February 202712$5,400.002$916.67
October 2027April 2027March 202712$5,400.003$1,375.00
November 2027May 2027April 202712$5,400.004$1,833.33
December 2027June 2027May 202712$5,400.005$2,291.67

Source: Medicare.gov, “When does Medicare coverage start?”, 42 CFR 406.6(d)(4), 26 U.S.C. 223(b)(7), Rev. Proc. 2025-19 ($4,400 for 2026) and Rev. Proc. 2026-24 ($4,500 for 2027), plus the $1,000 age 55 additional contribution of Section 223(b)(3), read on October 22, 2026. The prorated limits are $5,400 and $5,500 times eligible months divided by 12, the method in the Publication 969 example. The calendar is our arithmetic.

Three things the table shows that most summaries leave out. First, the rule is a calendar, not a rule of thumb: “stop six months early” is off by one month, because the application month itself is not part of the lookback and the start month already has a zero limit. Second, an application in the first half of 2027 reaches back into 2026, so it cuts the 2026 limit, and anyone who has already funded 2026 in full should look at the January to June rows now, in October 2026. Third, from July 2027 onward the whole 2026 limit is safe and the damage is confined to 2027.

If you must have the year’s contributions in before you apply, the arithmetic runs the other way too. Contributions for a year can be made until the return’s due date (Publication 969 gives April 15, 2026 for 2025, so April 15, 2027 for 2026 on our reading), but only for months in which you were an eligible individual, so the cap in the table, not the date, is what limits a late 2026 deposit.

A worked example (our arithmetic)

A 66-year-old with self-only coverage, a full 2027 payroll deduction of $5,500 (including the $1,000 catch-up) and a plan to start Social Security in October 2027:

  • Part A starts April 2027 (October minus six months), so January, February and March 2027 are eligible: 3 months.
  • The prorated 2027 limit is $5,500 x 3 / 12 = $1,375.
  • The excess is $5,500 - $1,375 = $4,125, and the excise tax is 6 percent of it, $247.50 a year while it stays in the account.
  • Withdrawing the $4,125 with its earnings by the return’s due date, including extensions, avoids the tax on it (Publication 969), but the earnings are income.

Employer contributions count toward the limit, so a payroll plan has to be cut off in the same month, not just your own deposits.

If you are just turning 65

The six-month reach has a floor. The Medicare.gov page says premium-free Part A starts the month you turn 65, and “If your birthday is on the first of the month, coverage starts the month before you turn 65.” A person who applies soon after the birthday therefore loses fewer months.

CasePart A startsEligible months in 20272027 limit, self-only age 55+, prorated
Turned 65 in March 2027, applied April 2027March 20272 (January and February)$916.67
Turned 65 in October 2027, applied December 2027October 20279 (January to September)$4,125.00
Birthday November 1, 2027, applied December 2027October 20279 (January to September)$4,125.00

Source: Medicare.gov, “When does Medicare coverage start?” for the start month and the first-of-the-month birthday rule; Rev. Proc. 2026-24 and Section 223(b)(3) for $5,500; read on October 22, 2026. Eligible months and prorated limits are our arithmetic.

If you receive Social Security when you reach 65, you are in the other group. Under 42 CFR 406.6(b) you do not need to apply for Part A, and it starts the month you turn 65. In that case there is no backdating to worry about, but the contribution limit is zero from the birthday month, which for most employees means telling payroll before the year of the birthday.

Not applying: how to keep contributing

The documents give one clear path. The HSA limit goes to zero when you are entitled to Medicare, and premium-free Part A entitlement is triggered by applying for Part A or for Social Security. A person who is still working with a high deductible plan, and who has not applied for Social Security or Part A, is not enrolled (our reading). Medicare.gov’s page adds a warning for the day you do enroll: “After your Initial Enrollment Period ends, you can only sign up for Part B and premium-Part A during one of the other enrollment periods.” One of them is the January 1 to March 31 General Enrollment Period, under which coverage starts the month after you sign up. We did not read the Part B late-enrollment penalty rules or the employer-coverage Special Enrollment Period for this page; they decide whether waiting costs more than the contributions are worth, and our IRMAA page covers the income-based Part B surcharge, not the late-enrollment penalty.

Starting Social Security is the other trigger, so the HSA date and the benefit date have to be chosen together. Our Social Security 2027 page has the earnings test and the 2027 wage base that go with that choice.

The 2027 limits next to 2026 and 2025

Item202520262027
Self-only contribution limit$4,300$4,400$4,500
Family contribution limit$8,550$8,750$9,000
Additional contribution at 55 or older$1,000$1,000$1,000
HDHP minimum deductible, self-only / family$1,650 / $3,300$1,700 / $3,400$1,750 / $3,500
HDHP maximum out-of-pocket, self-only / family$8,300 / $16,600$8,500 / $17,000$8,700 / $17,400
Excepted benefit HRA, newly availablenot in our sources$2,200$2,250

Source: IRS Rev. Proc. 2026-24 sections 3.01 and 3.02 (2027); Rev. Proc. 2025-19 section 2 (2026); IRS Publication 969 (2025) for 2025; 26 U.S. Code Section 223(b)(3) for the $1,000. Read on October 22, 2026.

The 2027 change over 2026 is $100 for self-only and $250 for family (our arithmetic). The $1,000 catch-up is written into Section 223(b)(3) for “2009 and thereafter” and is not indexed, which is why it does not appear in the revenue procedure. Rev. Proc. 2026-24 notes that the 2025 law (Pub. L. 119-21, Section 71308) added Section 223(c)(1)(E), under which a direct primary care arrangement is not treated as a health plan if its fees do not exceed $150 a month ($300 if it covers more than one person), effective for months beginning after December 31, 2025. Publication 969 (2025) also lists the telehealth change from that law. We did not find a Medicare-specific change in either document.

A married couple with family coverage splits one family limit, and each spouse aged 55 or older adds the catch-up to their own account (Publication 969). Section 223(b)(7) is written about “an individual”, so it is the entitlement of the account holder that zeroes that person’s limit; Publication 969 says the married-couple rules apply only if both spouses are eligible individuals. We found no further guidance for a couple with one spouse on Medicare; a tax preparer should run that case.

What an HSA can pay after 65

Section 223(d)(2) bars paying insurance premiums from an HSA, with listed exceptions. After the Medicare age the one that matters is Section 223(d)(2)(C)(iv): “any health insurance other than a medicare supplemental policy.”

ExpensePayable from an HSA?Why
Medicare Part A premium, if you pay oneYesHealth insurance, Section 223(d)(2)(C)(iv)
Medicare Part B premiumYesSame
Medicare Part D premiumYesSame
Medicare Advantage premiumYesSame; Publication 969 lists Medicare and other coverage if you were 65 or older
Medigap (Medicare supplement) premiumNoExcluded by name in Section 223(d)(2)(C)(iv) and in Publication 969
Qualified long-term care insurance premiumYes, up to the age-based limitSection 223(d)(2)(C)(ii); limits in Publication 969
Other health insurance, no exceptionNoSection 223(d)(2)(B)
Spouse’s Medicare premium while you are under 65Generally noPublication 969: the Medicare item is for a beneficiary who is 65 or older

Source: 26 U.S. Code Section 223(d)(2) (Cornell LII) and IRS Publication 969 (2025), “Insurance premiums”, read on October 22, 2026.

Two more points from the same sources. Distributions that are not for qualified medical expenses are taxed as income, and the extra 20 percent applies only before the Medicare age (Section 223(f)(4)(C); Publication 969: “There is no additional tax on distributions made after the date you are disabled, reach age 65, or die”). And the long-term care row ties to the premium limits on our hybrid long-term care tax page: an HSA is one of the routes there that avoids the 7.5 percent medical deduction floor.

If you are retiring before 65 and need to plan health coverage and income until Medicare starts, the 2027 subsidy cliff page covers the early-retiree side.

What a reader can do with this

  • Pick the application month first, then count back seven. Use the table: the month before the Part A start is the last month with a contribution limit.
  • Tell payroll the month, in writing. Employer contributions and payroll deferrals count, and a front-loaded deposit made early in the year can overfund a year in which Part A starts later.
  • If you already funded 2026 in full and may apply before July 2027, check the table now. The January to June 2027 rows cut the 2026 limit.
  • If you have an excess, act before the due date. Publication 969 allows a tax-free correction by withdrawing the excess and its earnings by the due date of the return, including extensions. Ask the HSA custodian for the excess-contribution form.
  • Check your birthday month. If the birthday is on the first, Part A starts the month before.
  • Keep Medigap premiums out of HSA claims. Part B, Part D and Medicare Advantage premiums can be reimbursed; Medigap cannot.
  • Look at your Social Security date at the same time. Medicare.gov starts the six months from the day you apply for Social Security as well as from the day you sign up for Part A.

Update alert · free

An email when the hsa and medicare timing rules numbers change

When a rate, rule or filing behind this page changes: what changed, the one number that matters, and the source to check it yourself.

FAQ

Sources, read and saved on October 22, 2026: IRS Rev. Proc. 2026-24 (2027 HSA amounts) and Rev. Proc. 2025-19 (2026 amounts); IRS Publication 969 (2025), revised February 11, 2026; 26 U.S. Code Sections 223 and 4973 (Cornell Legal Information Institute); 42 CFR 406.6 (eCFR, current to October 1, 2026); Medicare.gov, “When does Medicare coverage start?”. The calendar, the prorated limits, the worked example and the birthday cases are our arithmetic. This is analysis of public documents, not investment, legal or tax advice.

Affiliate Disclosure: Some links are affiliate links. We may earn a commission at no extra cost to you. This does not affect our ratings. Learn more.