Taxes Long-form guide

Form 8889 line by line — the HSA deduction without the line-9 trap

Form 8889 line by line for tax year 2025: why W-2 box 12 code W goes on line 9 not line 2, the 2025 limits, and the path to Schedule 1, line 13.

CC
Author

Cristian Corrales

Founding editor of finbarrow. Math-first analysis of US personal finance, anchored to primary sources (CFPB, FDIC, FRB, IRS, FICO, FINRA, SEC, NCUA).

Published · 5-minute read
Editorial desk illustration of an IRS Form 8889 HSA line by line walkthrough with a W-2 and a calculator on cream paper

The short answer. On Form 8889 (Health Savings Accounts), the money your employer put into your Health Savings Account (HSA) — including everything reported on your W-2 in box 12 with code W — belongs on line 9, never on line 2. Line 2 is reserved for contributions you made directly, out of your own pocket, outside of payroll. Get those two lines mixed up and you will claim a deduction you are not entitled to, which the Internal Revenue Service (IRS) reads as an excess contribution. The error that triggers more HSA penalty notices than any other is putting box-12 code-W dollars on line 2, where they double-count against money the form already excluded from your wages.

This page is about the mechanics of the form itself — how each line connects to the next, and how the whole thing lands on your return. If you are still deciding whether to treat the account as a long-term investment vehicle, that belongs to a different conversation, and we cover it in using an HSA as a retirement account. If you are weighing the account against a Flexible Spending Account, see HSA versus FSA. Here, we assume you are HSA-eligible and you simply need to fill in Form 8889 without tripping the wire.

What Form 8889 actually does

Form 8889 has one job on the contribution side: it reconciles everything that went into your HSA during the year against your legal limit, and it produces the deduction you are allowed to take. The contribution math lives in Part I, and the answer it spits out flows to Schedule 1, which is the attachment that feeds adjustments into your Form 1040. The distribution side (what you took out and what you spent it on) lives in Part II, and the last-month rule and its testing period live in Part III. We deliberately leave Part III alone here, because it has enough quirks to deserve its own page — see the HSA last-month rule and testing period for that depth.

Part I, line by line

Here is the contribution side in the order the form walks you through it, with the verified line assignments:

  • Line 1 asks for your coverage type — self-only or family. When your coverage changed mid-year, you use whichever type was in effect for the longer stretch; if both applied at the same time at any point, you mark family.
  • Line 2 is the contributions you made directly, out of pocket — money you sent to the HSA yourself, not through your employer, not through a cafeteria or salary-reduction plan, and not as a rollover from another account.
  • Line 3 is your contribution limit. A separate Line 3 worksheet handles the awkward cases, such as coverage that started or stopped partway through the year.
  • Line 9 is the employer side. This is the line that catches people. It includes the amount on your W-2 box 12 with code W, and it includes any cafeteria-plan salary-reduction contributions, because those payroll dollars count as employer contributions rather than yours.
  • Line 11 is your reduced limit — line 3 minus line 9 minus line 10 — which shows how much room is left after the employer money is accounted for.
  • Line 13 is your HSA deduction, the smaller of line 2 or line 12, and it is the number that travels to Schedule 1, line 13.

That last hop matters: the deduction does not appear on the face of the 1040 directly. It rides Schedule 1 as an above-the-line adjustment, which is what makes it valuable even if you take the standard deduction.

The line-2 trap, stated plainly

The reason code-W money must sit on line 9 and not line 2 is that it was never in your taxable wages to begin with. When your employer funds an HSA, or when you fund it through payroll, that amount is already excluded from box 1 of your W-2. You got the tax break at the source. Line 2 exists to deduct contributions that were not yet excluded — the out-of-pocket dollars you sent in with already-taxed money. If you drop code-W amounts onto line 2, you are asking the IRS to deduct them a second time.

The consequence is not cosmetic. Double-counting inflates your deduction, and because the form treats the duplicated dollars as additional contributions, it can push your total over your line-3 limit. That is an excess contribution, and excess contributions carry a 6% excise tax for each year the excess stays in the account. A notice from the IRS recalculating a smaller deduction is the gentle version; the excise tax is the version that compounds.

The 2025 and 2026 limits and the per-person catch-up

For tax year 2025, the contribution limits are $4,300 for self-only coverage and $8,550 for family coverage. For tax year 2026 they rise to $4,400 self-only and $8,750 family, under IRS Rev. Proc. 2025-19. In either year, if you are 55 or older at the end of the year, you may add a $1,000 catch-up contribution on top.

The catch-up has one feature that surprises married couples: it is per-person, and it must be made to that person’s own HSA. A spouse’s $1,000 catch-up cannot ride along inside your account. If both of you are 55 or older and you want both catch-ups, each spouse needs their own HSA to receive their own $1,000. Couples who try to stack two catch-ups into a single account create — once again — an excess contribution, and the same 6% excise tax follows.

These figures are indexed and change from year to year — hence the separate 2025 and 2026 numbers above — so confirm the year before you copy a number from memory, and match the limit to the tax year of the return you are filing.

Before you file

Three checks save almost everyone from the common notices. First, open your W-2, find box 12, and trace the code-W figure straight to line 9 — never line 2. Second, confirm your coverage type on line 1 matches the plan you actually held, because a self-only entry against family contributions silently shrinks your limit. The eligibility question of whether your plan even qualifies is a separate matter, and we walk through it in the HDHP versus PPO math. Third, if you are claiming a catch-up, make sure the extra $1,000 went into the right person’s account. Do those three things, follow the lines down to the deduction on line 13, and carry that figure to Schedule 1, line 13. The form is short. The trap is narrow. Staying out of it is mostly a matter of reading box 12 correctly.

Frequently asked

Quick answers

Do employer HSA contributions go on Form 8889 line 2 or line 9?

They go on line 9, not line 2. Line 2 is only for contributions you made directly, out of pocket. Employer contributions belong on line 9.

Where do W-2 box 12 code W amounts go on Form 8889?

On line 9. Code W already covers both your employer's contribution and your own payroll/cafeteria-plan contributions, and all of it is treated as employer money.

What are the HSA contribution limits for 2025 and 2026?

For tax year 2025 the limits are $4,300 self-only and $8,550 family. For tax year 2026 they rise to $4,400 self-only and $8,750 family (IRS Rev. Proc. 2025-19). In either year, add a $1,000 catch-up if you are 55 or older at year-end.

Where does the HSA deduction go on my 1040?

Your HSA deduction from Form 8889 line 13 flows to Schedule 1, line 13, and from there into your Form 1040.


Educational content only. finbarrow is an independent editorial publication, not a licensed financial advisor, broker, tax preparer, or attorney. Verify rates and terms with the issuer or relevant regulator. See disclaimers and funding disclosures.

← Back to Taxes