HSA Contributions on Your W-2: Code W, Form 8889, and Limits

HSA contributions on your W-2 appear in Box 12 with Code W. That single figure combines everything your employer put into your health savings account plus every dollar you routed there through pre-tax payroll deductions during the year. Contributions you made directly from a personal bank account are not part of Code W and get handled separately on your tax return.

What the Code W Number Covers

Code W bundles two things into one amount: flat employer contributions to your HSA, and your own pre-tax contributions taken from your paycheck under a Section 125 cafeteria plan.1Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The W-2 does not break the two pieces apart. You see one combined number.

Because those dollars moved through payroll pre-tax, they were already stripped out of your taxable wages. The Code W amount is excluded from Box 1 (wages), Box 3 (Social Security wages), and Box 5 (Medicare wages).1Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans You do not deduct the Code W amount again on your return; the tax break is already baked into the wage boxes.

What Code W does not include: any contribution you made by writing a check or transferring money from your bank to your HSA custodian. Your employer never touched those dollars and will not report them.

Why Payroll Contributions Save More Than Direct Ones

Pre-tax payroll contributions to an HSA skip federal income tax, Social Security tax (6.2%), and Medicare tax (1.45%).2Internal Revenue Service. Topic No. 751, Social Security and Medicare Withholding Rates Direct contributions from your own bank account are deductible on your tax return, but they have already been hit with that 7.65% in FICA and there is no way to recover it. If your employer offers HSA contributions through payroll, that route saves more than the same dollar contributed on your own.

Putting Code W on Form 8889

Anyone with HSA activity during the year files Form 8889 with their return. The Code W amount goes on Line 9, which captures employer contributions along with your payroll contributions routed through a cafeteria plan.3Internal Revenue Service. Instructions for Form 8889 (2025)

If you also contributed directly from a personal account, that amount goes on Line 2. The instructions are explicit: do not put employer or payroll contributions on Line 2, and do not include rollovers from another HSA.3Internal Revenue Service. Instructions for Form 8889 (2025) Form 8889 then measures your total against the annual limit and produces your deduction on Line 13, which flows to Schedule 1 (Form 1040), Line 13.4Internal Revenue Service. Instructions for Form 8889 (2025)

You can make direct contributions for a tax year all the way to that year’s filing deadline. Contributions made by April 15, 2026, still count toward 2025.1Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans Keep your own records, because Code W will not show any of it.

Your HSA custodian will send Form 5498-SA confirming the total contributions received during the year.5Internal Revenue Service. About Form 5498-SA, HSA, Archer MSA, or Medicare Advantage MSA Information You do not file it with your return, but the total should match your Code W plus any direct contributions. If it doesn’t, something was recorded wrong.

If You’re Married Filing Jointly

When both spouses have HSAs, each spouse fills out a separate Form 8889 using their own W-2’s Code W on their own Line 9. Combine the Line 13 deductions from each form and enter the total on Schedule 1, Line 13.3Internal Revenue Service. Instructions for Form 8889 (2025) When one or both spouses have family HDHP coverage, the family contribution limit is shared, split equally by default unless you agree to a different division.6Office of the Law Revision Counsel. 26 U.S. Code 223 – Health Savings Accounts Each spouse’s age 55+ catch-up is separate, but only if each spouse has their own HSA.

Checking Code W Against the Annual Limit

The combined total of employer contributions, payroll contributions, and any direct contributions cannot exceed the annual limit. For 2026:

  • Self-only coverage: $4,400
  • Family coverage: $8,750
  • Age 55+ catch-up: an additional $1,000 on top of the applicable limit

The $4,400 and $8,750 figures come from IRS Notice 2026-05.7Internal Revenue Service. Notice 2026-05, Expanded Availability of Health Savings Accounts Under the OBBBA The $1,000 catch-up is set by statute and does not adjust for inflation.6Office of the Law Revision Counsel. 26 U.S. Code 223 – Health Savings Accounts

To contribute at all, your health plan must qualify as a high deductible health plan. For 2026, that means a minimum annual deductible of $1,700 for self-only or $3,400 for family coverage, with out-of-pocket expenses (excluding premiums) capped at $8,500 for self-only or $17,000 for family.7Internal Revenue Service. Notice 2026-05, Expanded Availability of Health Savings Accounts Under the OBBBA

New for 2026: bronze and catastrophic plans purchased through an ACA Exchange are treated as HSA-compatible even when they don’t meet the traditional HDHP thresholds, and the same treatment applies to identical plans purchased off-Exchange.8Internal Revenue Service. Treasury, IRS Provide Guidance on New Tax Benefits for Health Savings Account Participants Under the One, Big, Beautiful Bill

What to Do If Code W Looks Wrong

Compare your Code W to your own payroll records. If the numbers do not match, start with your employer’s payroll or HR department. Employers correct W-2 errors by issuing Form W-2c.9Internal Revenue Service. General Instructions for Forms W-2 and W-3 If the original W-2 hasn’t been sent to the Social Security Administration yet, the employer can void it and issue a new one. If it has been filed, they file the W-2c with the SSA and give you a copy.

If the employer won’t fix it, the IRS can push. After the end of February, call the IRS at 800-829-1040 and file a W-2 complaint. The IRS will send your employer a letter requiring a corrected form within ten days. If nothing comes, you can file using Form 4852 as a substitute W-2, estimating your wages and withholding from your final pay stub.10Internal Revenue Service. W-2 – Additional, Incorrect, Lost, Non-Receipt, Omitted A corrected W-2 that arrives later with different numbers will require an amended return on Form 1040-X.

When Contributions Exceed the Limit

If Code W plus any direct contributions exceeds the annual limit, the excess is subject to a 6% excise tax for every year it stays in the account.1Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The tax repeats annually until the excess is removed.

To avoid the penalty, withdraw the excess and any earnings on it before the filing deadline for that year’s return, including extensions.1Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The earnings you pull out are taxable income for the year the contribution was made. If you already filed on time but missed the withdrawal, you can still make it within six months of the original filing deadline (excluding extensions) and file an amended return.3Internal Revenue Service. Instructions for Form 8889 (2025)

Excess contributions typically show up after a mid-year job change when two employers each contribute, or when someone makes direct contributions on top of payroll deductions without tracking the running total. Add up Code W from every W-2 you received for the year, add any direct contributions, and check the sum against the annual limit before filing.

State Tax Treatment

Most states follow the federal treatment and let you deduct HSA contributions on your state return. California and New Jersey are the exceptions. Both states tax HSA contributions as regular income and also tax interest or investment gains inside the account. In those states, your Code W amount reduces your federal taxable income but not your state taxable income. Residents of the nine states with no income tax don’t need to worry about the distinction.