What Does W-2 Box 12 Code W Mean for Your Taxes?

Code W in Box 12 of your W-2 is the total amount that went into your Health Savings Account through your employer during the year. It combines two things into one figure: what your employer contributed on your behalf, and what you contributed from your paycheck on a pre-tax basis through a cafeteria plan. That money has already been excluded from the wages in Box 1, so you don’t claim a separate deduction for it, but you still have to report it on Form 8889 when you file.

What the Code W Number Actually Includes

Employers are required to report all HSA contributions routed through payroll in Box 12 using Code W.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 The single dollar figure lumps together:

  • Contributions your employer made to your HSA at no cost to you
  • Your own contributions taken from your paycheck before taxes through a Section 125 cafeteria plan

Your W-2 will not break out the employer’s share versus your own. If you need to know the split, check your final pay stub of the year or ask your benefits department.

What Code W does not include: any deposits you made to your HSA directly from a personal bank account. Those are after-tax contributions, and you track them separately.

Why You Don’t Deduct Code W Again

Contributions reported under Code W have already been removed from your taxable wages in Box 1, so no federal income tax was withheld on them. In most employer plans they are also excluded from Social Security wages (Box 3) and Medicare wages (Box 5), which saves an additional 7.65% in payroll taxes.2Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts

Because the tax break was built into your paycheck all year, you do not deduct the Code W amount on your return. Trying to claim it as a deduction would double-dip. Direct after-tax contributions work differently: those are made with money that has already been taxed, so you claim the deduction on your return to get the benefit.

Reporting Code W on Form 8889

Anyone who had an HSA during the tax year must file Form 8889, even if the only contributions were through payroll. The Code W amount goes on Line 9, which the form labels for employer contributions including your pre-tax payroll deductions.3Internal Revenue Service. 2025 Instructions for Form 8889 Any direct after-tax contributions you made yourself go on Line 2.

The form compares your total contributions against the annual limit for your coverage type and months of eligibility, then calculates any deduction. If everything you put in came through payroll and you stayed under the cap, you’ll file Form 8889 with no separate deduction to claim. The deduction, if you have one, flows to Schedule 1 (Form 1040), Part II, Line 13.3Internal Revenue Service. 2025 Instructions for Form 8889 It’s an above-the-line deduction, so it lowers your adjusted gross income whether or not you itemize.

Checking Code W Against the Annual Limit

Code W counts toward the same annual cap as every other type of HSA contribution. To see whether you’re at, under, or over the limit, add the Code W figure to any direct deposits you made yourself.4Internal Revenue Service. Revenue Procedure 2025-19 For 2026, the caps are:

  • Self-only HDHP coverage: $4,400
  • Family HDHP coverage: $8,750
  • Catch-up if you’re 55 or older: an additional $1,000

The catch-up amount is per person and must go into that person’s own HSA. If you and your spouse both qualify and both are covered by the family plan, each of you can add $1,000, but not into the same account.5Fidelity. HSA Contribution Limits and Eligibility Rules for 2025 and 2026

To be eligible to contribute in the first place, you must be enrolled in a qualifying high-deductible health plan and cannot be enrolled in Medicare, claimed as a dependent, or covered by disqualifying secondary coverage such as a general-purpose FSA.6Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Accounts You have until the federal tax filing deadline (usually April 15) to make direct contributions counted toward the prior tax year.

What Happens if Code W Pushes You Over the Limit

Going over the cap triggers a 6% excise tax on the excess, and that tax repeats every year the excess stays in the account.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts The IRS doesn’t distinguish between an overage caused by your employer, your payroll election, or your direct deposits — a dollar over is a dollar over.

To avoid the 6% tax, withdraw the excess and any earnings on it before the filing deadline (including extensions). When you do:

  • The excess amount is included in your gross income for the year it was contributed and is not deductible.
  • Any earnings on the excess must also come out and be reported as other income.

If you already filed and then noticed the overage, you have up to six months after the filing deadline (without extensions) to withdraw the excess and file an amended return, writing “Filed pursuant to section 301.9100-2” at the top.8Internal Revenue Service. Instructions for Form 8889 The 6% excise tax itself is reported on Form 5329.9Internal Revenue Service. Form 5329 – Additional Taxes on Qualified Plans and Other Tax-Favored Accounts

If your employer’s contributions alone put you over the limit, Part II of Form 8889 is where you reconcile it. Excess employer contributions that weren’t already added back to your W-2 wages get reported there as other income.8Internal Revenue Service. Instructions for Form 8889

If Code W Looks Wrong

Errors happen, often because payroll systems bundle health insurance premiums together with HSA contributions or mishandle a mid-year enrollment change. Compare the Code W figure against your HSA custodian’s year-end statement, which shows what was actually deposited.

If they don’t match, ask your employer’s payroll department to issue a corrected W-2 (Form W-2c). Bring the custodian statement and pay stubs. Employers usually want to fix these errors because an inaccurate W-2 creates its own compliance exposure.

If the correction won’t be ready before you need to file, report the actual contribution amounts on Form 8889 and keep the custodian statement and pay stubs as backup. The IRS reconciles Form 8889 against your W-2, and the form has space to report what actually happened.

An employer that deposited too much can recover a mistaken contribution from the HSA custodian if there is clear documentary evidence of an administrative error and the correction happens while the tax year is still open. If the employer doesn’t claw the funds back by year-end, the overage is treated as taxable income to you and you’ll need to follow the excess-contribution withdrawal process above.

State Tax Exceptions

The federal exclusion for Code W contributions doesn’t carry over automatically to every state. California and New Jersey do not recognize HSA tax advantages. If you live in either state, your Code W contributions remain subject to state income tax, and any investment earnings in the account are also taxable on your state return. Check your state’s treatment before assuming the payroll exclusion applies to your state wages.