How it works
Medicare.gov's rule for signing up for premium-free Part A after your initial enrollment window backdates coverage up to 6 months, but never earlier than the month you turned 65. IRS Publication 969 is direct that your HSA contribution limit is zero from the first month you're enrolled in Medicare, including retroactively, so contributions made in a backdated window become excess contributions with a 6% excise tax (Form 5329) for every year they aren't withdrawn. Enrolling 14 months after turning 65 while contributing $500/month backdates the full 6 months: a $3,000 excess and a $180 excise tax if it stays in the account; enrolling right at 65 creates no retroactive window at all. The practical fix: stop HSA contributions at least 6 months before you apply for Medicare or Social Security past 65. More in the Medicare Advantage vs. Original Medicare guide.