Back to Blog
Tax DeductionsApril 29, 202624 min read

Form 8889 + AI Agent Skill: HSA Contributions Guide 2026

Form 8889 + AI Agent Skill: HSA Contributions Guide 2026

Hi, I'm Slava, CEO and co-founder of Jupid. In conversations with founders and freelancers about tax-advantaged accounts, the Health Savings Account is the one almost everyone underuses. Most people treat the HSA as a glorified medical checking account — they contribute, then immediately drain it for doctor visits and prescriptions. The folks who actually understand the HSA treat it as a stealth retirement account: they max it out, invest the balance, pay medical bills from cash, and let the HSA compound tax-free for 30 years. Form 8889 is the paperwork that makes it real.

Official IRS resources: Form 8889 (PDF) · Instructions (PDF) · About Form 8889

The HSA is the only account in the U.S. tax code that gets all three breaks: a deduction going in, tax-free growth in the middle, and tax-free withdrawals coming out for qualified medical expenses. A 401(k) gives you two of the three. A Roth IRA gives you two of the three. Only the HSA gives you all three. Yet most HSA holders contribute the bare minimum and then withdraw it the same year — the worst possible use.

This guide walks through Form 8889 line by line, covers the 2026 contribution and HDHP limits, explains qualified medical expenses, and shows how a family using the HSA correctly can shelter income and grow it tax-free for retirement.

What Is Form 8889?

Form 8889 (officially "Health Savings Accounts (HSAs)") reports two things to the IRS: contributions made to your HSA during the tax year, and distributions taken from your HSA during the tax year. The form computes your above-the-line HSA deduction and any taxable portion of distributions used for non-qualified expenses.

Legal Basis: IRC §223 establishes the Health Savings Account, sets contribution limits, defines High-Deductible Health Plan (HDHP) requirements, and governs the tax treatment of contributions and distributions. IRS Publication 969 (Health Savings Accounts and Other Tax-Favored Health Plans) provides the consumer-facing guidance.

Who Files Form 8889?

Anyone who, during the tax year, did any of the following must file Form 8889:

  • Made HSA contributions directly (outside payroll)
  • Had employer HSA contributions reported in Box 12, code W on Form W-2 (this includes pre-tax cafeteria-plan contributions)
  • Took any distribution from an HSA (reported on Form 1099-SA)
  • Had a one-time qualified HSA funding distribution from an IRA
  • Failed to maintain HDHP coverage after using the last-month rule

If your spouse has a separate HSA, each spouse files a separate Form 8889. You cannot combine HSAs on a single form even on a joint return.


HSA Eligibility

Not everyone with high medical expenses can open or contribute to an HSA. The eligibility rules are strict and the IRS does not bend them.

To be HSA-eligible for a given month, you must meet all four of these conditions on the first day of that month:

  1. Enrolled in a qualifying HDHP (High-Deductible Health Plan) — see deductible and out-of-pocket maximums below
  2. No other disqualifying health coverage — including a spouse's family-coverage HMO/PPO, a general-purpose Flexible Spending Account (FSA) on you or your spouse, or TRICARE. Limited exceptions exist for vision, dental, disability, accident, and limited-purpose FSAs.
  3. Not enrolled in Medicare (Part A, B, C, or D) — once you enroll in any part of Medicare, you can no longer contribute, even if you have HDHP coverage. You can still take qualified distributions from an existing HSA.
  4. Not claimed as a dependent on someone else's tax return

If you fail eligibility for any month, you cannot contribute for that month (with the last-month rule exception covered below).

Legal Citation: IRC §223(c) defines an "eligible individual" and the four conditions above.


Executive Summary: 2026 HSA Key Numbers

The IRS announces HSA contribution limits and HDHP minimums each year via Revenue Procedure, typically in May or June for the following year. As of April 2026, the 2026 limits had not yet been formally published. Use the 2025 figures below as your baseline and verify the current Revenue Procedure before filing.

Item2025 Amount2026 Status
HSA contribution — self-only$4,300TBD (verify Rev. Proc. 2025-XX)
HSA contribution — family$8,550TBD
Catch-up contribution (age 55+)$1,000$1,000 (statutory, no inflation adj.)
HDHP minimum deductible — self-only$1,650TBD
HDHP minimum deductible — family$3,300TBD
HDHP out-of-pocket max — self-only≤ $8,300TBD
HDHP out-of-pocket max — family≤ $16,600TBD
Excess contribution excise tax6% per year (statutory)6%
Last-month rule testing period12 months12 months
Non-qualified distribution penalty (under 65)20% additional tax20%

Tax Savings Potential:

For a family at the 24% federal bracket making the maximum 2025 family contribution:

  • HSA contribution: $8,550
  • Federal tax savings (24% bracket): $2,052
  • FICA savings if contributed via cafeteria plan (7.65%): $654 additional
  • State savings (varies by state): typically $300–$600

A solo filer at 22% maxing self-only at $4,300 saves roughly $946 federal plus state and FICA.

Legal Basis: IRC §223; Rev. Proc. 2024-25 (2025 limits); IRS Publication 969; Form 8889 and instructions.


The Triple Tax Advantage

The HSA is the only account that gets all three of these breaks at the same time:

1. Contributions are deductible above-the-line. Direct contributions flow from Form 8889 Line 13 to Schedule 1, Line 13, reducing your AGI. You don't have to itemize. If your employer routes contributions through a Section 125 cafeteria plan, the contribution is already pre-tax on your W-2 — you save federal income tax, FICA (7.65%), and usually state tax too.

2. Growth is tax-free. Interest, dividends, and capital gains inside the HSA are not taxed. Larger custodians (Fidelity, Lively, HealthEquity, Optum) offer brokerage-style HSAs where you can buy index funds once your balance crosses a threshold. A $4,300 contribution invested at 7% annually for 30 years grows to roughly $32,700 — never taxed if used for qualified medical expenses.

3. Withdrawals for qualified medical expenses are tax-free, forever. No deadline. You can pay a $300 dentist bill in 2026 with cash, save the receipt, and reimburse yourself from the HSA in 2056. The IRS imposes no statute of limitations on HSA reimbursements as long as the expense was incurred after the HSA was established and you can document it.

Legal Citation: IRC §223(d) establishes the HSA trust; §223(f) governs distribution treatment; Notice 2004-50 covers documentation requirements.


Form 8889 Part I — Contributions

Part I computes your HSA contribution deduction and reconciles employer vs. self contributions.

Line 1: Coverage Type

Check the box for the coverage you had on the first day of the last month of the tax year (typically December 1):

  • Self-only — HDHP covered only you
  • Family — HDHP covered you and at least one other person

If you switched between self-only and family coverage during the year, you must use the partial-year proration worksheet from the Form 8889 instructions, unless you use the last-month rule (see below).

Line 2: HSA Contributions YOU Made

Enter HSA contributions you made directly — not through payroll. This includes personal contributions written from your bank account and contributions a family member made on your behalf.

Do NOT include: cafeteria plan contributions, employer-only contributions (both go to Line 9), rollovers from another HSA, or the IRA-to-HSA funding distribution (Line 10). The 5498-SA from your custodian reports total contributions; subtract Line 9 to get Line 2.

Line 3: Contribution Limit

Your annual contribution limit, computed as follows:

If you had the same coverage all 12 months:

  • Self-only: $4,300 (2025) — verify current year
  • Family: $8,550 (2025) — verify current year

If coverage changed during the year, use the Limitation Chart and Worksheet in the Form 8889 instructions. Each month, you get one-twelfth of the annual limit for whatever coverage you had on the first day of that month. Sum the months.

Last-month rule (IRC §223(b)(8)): If you are HSA-eligible on December 1, you can contribute the full annual amount, even if you weren't eligible earlier in the year. The catch: you must remain HSA-eligible for the entire following calendar year (the "testing period"). If you fail eligibility during the testing period, you owe income tax plus a 10% additional tax on the excess contributions (computed on Part III).

Line 4: Archer MSA Contributions

Contributions to a separate Archer Medical Savings Account (a predecessor program now closed to new enrollees). Most filers enter $0.

Lines 5–6: Subtractions

  • Line 5 = Line 3 − Line 4
  • Line 6 = Line 5 (or your share if married and both spouses have family HDHP — the $8,550 family limit splits between spouses by agreement)

Line 7: Catch-Up Contribution

If you were age 55 or older by the end of the tax year and were HSA-eligible, you can add $1,000. The catch-up amount is set by statute and does not adjust for inflation. Each spouse age 55+ can make a separate catch-up contribution only into their own HSA — you cannot put both spouses' catch-ups into one HSA.

Line 8: Total

Line 6 + Line 7. This is your full annual contribution limit.

Line 9: Employer Contributions

Report employer HSA contributions, including cafeteria plan contributions (technically employer contributions in tax terms). The amount appears on Form W-2, Box 12, code W. These are already excluded from your Box 1 wages — you can't deduct them again on Line 13.

Line 10: Qualified HSA Funding Distribution

A one-time, lifetime transfer from your IRA to your HSA, capped at your annual HSA contribution limit. The transfer is tax-free, but it counts against your HSA limit for the year (so it's only useful if you can't otherwise afford the contribution and want to fund it from IRA assets). The IRA-to-HSA testing period is 12 months — if you lose HSA eligibility during that period, the funding distribution becomes taxable.

This is a niche move. Most filers leave Line 10 at $0.

Lines 11–13: Deductible Portion

  • Line 11 = Line 9 + Line 10
  • Line 12 = Line 2 + Line 11 (capped at Line 8)
  • Line 13 = Smaller of Line 2 or (Line 8 − Line 11). This is your HSA deduction.

Line 13 flows to Schedule 1, Line 13 (HSA deduction). It reduces your AGI dollar-for-dollar.

If your direct contributions plus employer contributions exceeded the annual limit, you have an excess contribution. You must withdraw the excess plus any earnings by your tax-filing deadline (including extensions) or you pay a 6% excise tax every year the excess remains in the HSA. File Form 5329 to compute the excise tax.


Form 8889 Part II — Distributions

Part II reports money taken out of the HSA and determines whether any of it is taxable.

Line 14a: Total Distributions

The gross amount your HSA custodian distributed during the year. This number comes from Form 1099-SA, Box 1. The custodian sends 1099-SA in late January.

Line 14b: Excess Contribution Returns and Rollovers

Distributions that should not be counted as regular distributions:

  • Excess contributions you withdrew before the filing deadline (plus earnings on them)
  • HSA-to-HSA rollovers (one allowed per 12-month period)
  • Mistaken distributions returned to the HSA

Line 14c

Line 14a minus Line 14b. This is the net distribution to evaluate for taxability.

Line 15: Qualified Medical Expenses Paid from HSA

Enter the total amount on Line 14c that you used for qualified medical expenses (see the comprehensive list below). This is the protected, tax-free portion.

You don't attach receipts to your return, but you must keep them. The IRS can request documentation up to three years (or longer for substantial omissions) after filing.

Line 16: Taxable HSA Distributions

Line 14c minus Line 15. This is the portion of your HSA distribution that did not go to qualified medical expenses.

Line 16 flows to Schedule 1, Line 8f (Other income — Income from Form 8889) and is taxed at your ordinary rate.

Lines 17a and 17b: 20% Additional Tax

If Line 16 is greater than zero, you generally owe an additional 20% tax on the taxable amount (Line 16 × 20% = Line 17b).

Exceptions — no 20% penalty if the distribution was made because:

  • You died (distribution to beneficiary)
  • You became disabled (per IRC §72(m)(7) definition)
  • You reached age 65 — after 65, non-qualified distributions are taxed as ordinary income but no 20% penalty applies. This is why the HSA functions as a backup retirement account.

Line 17b flows to Schedule 2, Line 17c (Additional tax on HSA distributions).


Part III — Failure to Maintain HDHP Coverage (Last-Month Rule Testing Period)

You only complete Part III if both apply:

  1. You used the last-month rule in a previous year to make a full annual contribution
  2. You failed to remain HSA-eligible for the full 12-month testing period

If both apply, the excess contributions you made under the last-month rule become taxable income, plus you owe a 10% additional tax. The form walks you through the computation on Lines 18–21.

If you stayed HSA-eligible the whole testing period, skip Part III entirely.


Qualified Medical Expenses

What counts as a qualified medical expense for HSA purposes? The list is broad, governed by IRC §213(d), and detailed in IRS Publication 502 (Medical and Dental Expenses).

Qualified (HSA can pay tax-free):

  • Doctor, dentist, optometrist, chiropractor, psychiatrist visits
  • Prescription medications and OTC medications/menstrual products (CARES Act 2020)
  • Hospital and surgical fees, lab tests, X-rays, MRIs
  • Eyeglasses, contact lenses, eye exams, LASIK, hearing aids
  • Dental care including orthodontia, mental health therapy
  • Long-term care services and long-term care insurance premiums (capped by age)
  • COBRA premiums (when unemployed); Medicare Part A, B, D premiums (after 65)
  • Health insurance premiums while collecting unemployment
  • Medical equipment, acupuncture, smoking cessation programs

NOT qualified (taxable + 20% penalty if under 65):

  • Individual-market health insurance premiums (Healthcare.gov plans) for working-age filers
  • Cosmetic surgery (unless correcting a deformity)
  • Gym memberships and vitamins (unless prescribed for a medical condition)
  • Toiletries, cosmetics, funeral expenses

After age 65, you can use the HSA for any expense, qualified or not. Non-qualified withdrawals are subject to ordinary income tax but no 20% penalty. Qualified medical expenses remain tax-free at any age.

Legal Citation: IRC §213(d) defines medical care; IRS Publication 502 provides the comprehensive list with examples.

HSA triple tax advantage: contribute deductible, grow tax-free, withdraw tax-free for qualified medical

Worked Example: Daniel and Lisa, Family HDHP, Investing for Retirement

To make this concrete, here's how a married couple with separate HSAs reports Form 8889 when they treat the HSA as a long-horizon investment account.

Background:

  • Daniel, age 38, employed; family HDHP through his job covering himself and his spouse Lisa
  • Lisa, age 36, also employed; she has access to a separate self-only HDHP through her own employer
  • Both have been HSA-eligible all 12 months of 2025
  • Combined household 24% federal bracket
  • They paid $2,400 of qualified medical expenses out of pocket (cash, not from HSA) and saved the receipts
  • Neither took a distribution from their HSA during the year — they invested the balances

Daniel's Form 8889

Daniel is the family HDHP holder, so he gets the family contribution limit on his own HSA.

Line 1:  Family coverage  ✓
Line 2:  HSA contributions Daniel made (direct):   $8,550
Line 3:  Contribution limit (family, 12 months):   $8,550
Line 4:  Archer MSA:                                    $0
Line 5:  Line 3 − Line 4:                          $8,550
Line 6:  Line 5:                                   $8,550
Line 7:  Catch-up (under 55):                           $0
Line 8:  Total limit:                              $8,550
Line 9:  Employer contributions (W-2 Box 12 W):         $0
Line 10: Qualified HSA funding distribution:            $0
Line 11: Line 9 + Line 10:                              $0
Line 12: Line 2 + Line 11:                         $8,550
Line 13: HSA deduction:                            $8,550
            → Schedule 1, Line 13

Daniel made his contributions directly from his bank account (not through his employer's payroll), so the entire $8,550 hits Line 2 and Line 13. If his employer had contributed via cafeteria plan, those dollars would land on Line 9 instead and the deduction would shift accordingly.

Part II is all zeros — Daniel didn't take any distribution.

Lisa's Form 8889

Lisa has her own HDHP, but the family contribution limit is shared between spouses by agreement. Daniel and Lisa agreed to put the full $8,550 on Daniel's HSA, so Lisa contributes nothing for the year and can skip Form 8889 (no contributions, no distributions).

If they had split the family limit — say, $4,250 to Daniel and $4,300 to Lisa's own HSA — both would file separate Form 8889s with their respective portions on Lines 2 and 13.

Combined Household Tax Effect

ItemAmount
Daniel's HSA deduction (Schedule 1 Line 13)$8,550
Federal tax savings @ 24%$2,052
State tax savings (varies, est. 5%)$428
Total first-year cash savings~$2,480

Because Daniel and Lisa paid the $2,400 of qualified medical expenses from cash, they've saved the receipts for future reimbursement. In 30 years, they can reimburse themselves $2,400 from the HSA tax-free — by which time the original $8,550 contribution has compounded inside the HSA at 7% annually to roughly $65,000.

Key takeaway: the most powerful move is contributing the full limit, paying current medical bills from cash, and letting the HSA grow. The deduction is locked in today; the growth is tax-free; the future withdrawal for medical expenses is tax-free; and after 65, the HSA functions like a Traditional IRA for non-medical uses.


Common Mistakes to Avoid

Mistake #1: Contributing Past the Annual Limit

Problem: Filers max out their HSA at work (cafeteria plan) and also make a direct contribution, ending up over the limit.

Impact: 6% excise tax every year the excess sits in the HSA, on Form 5329. The excise tax is recurring — it doesn't go away if you ignore it.

Solution: Withdraw the excess contribution plus earnings before your tax-filing deadline (with extensions). Most HSA custodians have an "excess contribution removal" form. The earnings come out as taxable income for the year of the excess, but you escape the 6% tax.

Mistake #2: Forgetting Partial-Year Proration

Problem: You enrolled in HDHP coverage in July but contribute the full annual limit, claiming you were "eligible at year-end."

Impact: Without invoking the last-month rule explicitly, you've over-contributed by half. Even with the last-month rule, you trigger the 12-month testing period — if you change jobs and lose HDHP coverage in the following year, the over-contribution becomes taxable plus 10%.

Solution: Either prorate (six months of eligibility = half the annual limit) or commit to the last-month rule and stay HSA-eligible for all of next year.

Mistake #3: Using the HSA for Non-Qualified Expenses

Problem: You use the HSA debit card to pay for vitamins, gym membership, or your individual-market health insurance premium.

Impact: Distribution becomes taxable income, plus a 20% additional tax if you're under 65. A $200 gym charge costs $200 + ~$50 income tax + $40 penalty = $90 in extra tax.

Solution: Confirm the expense is on the Pub 502 list before swiping the HSA card. When in doubt, pay from your regular account and skip the HSA.

Mistake #4: Not Reporting All 1099-SA Distributions

Problem: Your custodian sends 1099-SA showing $5,000 of distributions. You report only the $3,000 you used for medical and ignore the rest.

Impact: The IRS receives the same 1099-SA. Within 12–18 months you receive a CP2000 notice proposing additional tax on the unreported $2,000. Penalties accrue.

Solution: Every dollar on Form 1099-SA Box 1 must appear on Line 14a. Then Line 15 captures the qualified portion. The taxable balance lands on Line 16 — owning up to it on the return is much cheaper than fighting a CP2000 notice later.

Mistake #5: Contributing While Enrolled in Medicare

Problem: You turn 65, sign up for Medicare Part A (which is automatic if you take Social Security), and continue contributing to your HSA.

Impact: Medicare enrollment disqualifies you from HSA contributions starting the month you enroll. If you keep contributing, you owe the 6% excise tax.

Solution: Stop HSA contributions the month before Medicare enrollment. Note that Medicare Part A enrollment can be retroactive up to 6 months when you sign up for Social Security after 65, so plan ahead. You can still take qualified distributions from the existing HSA forever — only contributions are blocked.


How Jupid AI Helps with HSA Tracking

The HSA gets complicated fast: a 1099-SA from your custodian, a W-2 Box 12 code W from your employer, a 5498-SA in May, qualified vs. non-qualified medical expenses, partial-year proration, and the receipts you need to save for decades. Most filers lose track somewhere between the contribution and the distribution.

What Jupid does:

  • Automatic transaction categorization — When your HSA debit card runs against a doctor or pharmacy, Jupid categorizes it as a qualified medical expense at 95.9% accuracy. When it runs against the gym, Jupid flags the distribution as non-qualified before you file.
  • Bank connection and auto-categorization — Connect your HSA custodian and your regular checking, and Jupid tracks every dollar that moves between them, building the trail you'll need years later when you reimburse yourself.
  • Real-time eligibility tracking — Jupid tracks your contribution year-to-date against the annual limit and warns before you over-contribute.
  • Chat with your AI accountant — Ask "Was my August $340 dental bill a qualified medical expense?" or "How much can I still contribute to my HSA this year?" and get an answer in WhatsApp or iMessage with the IRS citation behind it.

Example conversation:

  • You: "I paid $1,200 for LASIK from my HSA in March. Is that qualified?"
  • Jupid: "Yes — LASIK is a qualified medical expense under IRS Pub 502. I've recorded the $1,200 against your HSA distributions for Form 8889 Line 15. Save the surgery center invoice; you'll want it if the IRS asks. Your remaining qualified spending budget for this year's HSA distributions is unlimited as long as expenses are documented."

The HSA is one of the few accounts where careful tracking pays compounding returns for thirty years. Jupid keeps the records straight so you can take advantage of the tax-free reimbursement window decades later.

Try Jupid →


Action Checklist: Form 8889 Filing

Throughout the Year

  • Confirm HDHP enrollment month-by-month
  • Track HSA contributions against the annual limit
  • Save receipts for every medical expense — even ones paid in cash
  • Distinguish qualified vs. non-qualified medical expenses before swiping the HSA card
  • If you have employer HSA contributions, confirm the year-end W-2 Box 12 code W amount is correct

Before Filing

  • Receive 1099-SA from HSA custodian (late January)
  • Receive 5498-SA from HSA custodian (May, but this arrives after most filers file — use end-of-year statement instead)
  • Reconcile total contributions: direct + cafeteria plan + employer + IRA-to-HSA funding distribution
  • Total qualified medical expenses paid from HSA
  • Confirm last-month rule eligibility if used in prior year

When Filing

  • Complete Part I (contributions and deduction)
  • Complete Part II (distributions and taxability)
  • Complete Part III only if last-month rule testing period failed
  • Attach Form 8889 to Form 1040
  • Verify Line 13 flowed to Schedule 1 Line 13
  • Verify any taxable distribution flowed to Schedule 1 Line 8f
  • Verify any 20% penalty flowed to Schedule 2 Line 17c
  • If filing jointly with two HSAs, file two separate Form 8889s

Resources and Citations

IRS Forms and Instructions

IRS Publications

  • Publication 969 — Health Savings Accounts and Other Tax-Favored Health Plans
  • Publication 502 — Medical and Dental Expenses (the qualified medical expense list)

Tax Code References

  • IRC §223 — Health Savings Accounts (eligibility, limits, distributions)
  • IRC §213(d) — Definition of medical care for tax purposes
  • IRC §125 — Cafeteria plans (pre-tax HSA contributions through payroll)
  • IRC §72(m)(7) — Disability definition for distribution penalty exception
  • Rev. Proc. 2024-25 — 2025 inflation-adjusted HSA limits and HDHP minimums
  • Notice 2004-50 — Comprehensive HSA Q&A (recordkeeping, qualified expenses, prohibited transactions)

Final Thoughts

The Health Savings Account is the most powerful tax-advantaged account most people ignore. Three breaks instead of two, and a backup retirement function after 65 that no other account offers.

The strategies that actually move the needle:

  1. Max the contribution every year — even if you have to cut another savings goal to fund it, the HSA's triple tax advantage makes it the highest-priority dollar
  2. Pay current medical bills from cash and save the receipts — every receipt is a future tax-free withdrawal lottery ticket
  3. Invest the HSA balance once it crosses your custodian's threshold — most HSA holders leave their balance in cash earning 0.1%, which wastes the tax-free growth advantage
  4. Treat the HSA as a long-horizon retirement account — by the time you're 65, the HSA can fund a decade of medical expenses (or anything else, taxed as ordinary income with no penalty)

Form 8889 is the paperwork. The strategy is what makes it worth filing.

Use This with Your AI Agent

If you're using Claude, ChatGPT, or another AI agent to help fill out Form 8889, we've published an open-source skill that gives the agent exact line-by-line instructions, validation checks, ask-don't-guess prompts, and worked examples — the same logic Jupid uses internally.

jupid-tax/jupid-skills on GitHub — forms/form-8889/

For Claude Code: cp -r jupid-skills/forms/form-8889 ~/.claude/skills/. For the Anthropic SDK, load SKILL.md into the system prompt and the references/ files on demand. For browser-automation runtimes, filing.md covers the e-file or paper-file workflow.



Disclaimer

This article provides general information about Form 8889 and Health Savings Accounts and should not be considered tax or financial advice. HSA rules are complex and depend heavily on the specific health plan, employer benefits structure, and life circumstances. The 2026 HSA contribution limits and HDHP requirements had not been formally announced by the IRS as of this article's publication date — verify the current Revenue Procedure before filing. For advice specific to your situation, consult with a qualified tax professional.

Tax Year: 2026 (figures shown reflect 2025 limits where 2026 has not been announced) Last Updated: April 29, 2026

Ready to simplify your finances?

Join 1,000+ businesses using Jupid to save time and money. Start simplifying your finances today.

30-day money-back guarantee