Employer contributions to your HSA appear on your W-2 in Box 12 with the code letter W. The dollar figure next to that code is the combined total of what your employer deposited into your Health Savings Account and what you contributed yourself through pre-tax payroll deductions during the year. It is not extra taxable income, and you do not deduct it again on your return.
What the Code W Number Actually Includes
Two categories of money get bundled into Code W: the contributions your employer made on your behalf, and the amounts you elected to have withheld from your paycheck through a Section 125 cafeteria plan.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) The IRS treats cafeteria-plan payroll deductions as employer contributions because the money leaves your paycheck before taxes are calculated.
What Code W does not include is any money you moved into your HSA on your own, outside of payroll. A personal check written to your HSA custodian or a transfer from your checking account never touches your W-2. Those direct contributions live on a different line of Form 8889.
Changed jobs during the year? Each W-2 carries its own Code W amount, and you add them together when you file. The IRS looks at the total going into your account, not which employer sent it.
Why It’s Missing From Your Taxable Wages
The number in Box 1 is smaller than your gross salary partly because Code W contributions were pulled out before your employer calculated withholding.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans That money also escapes Social Security and Medicare tax, which is a benefit you don’t get with after-tax contributions you make yourself.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)
That triple exclusion is why payroll-based HSA funding beats writing a check to your custodian for the same dollar amount. A direct contribution is deductible on your return, but you still paid the 7.65% Social Security and Medicare bite on those wages before you sent them in.
Because pre-tax HSA contributions shrink your adjusted gross income, they can quietly help with income-tested breaks like the Earned Income Tax Credit or education credits. Most people never notice the knock-on effect.
Putting the Amount on Form 8889
Anyone who contributed to or took distributions from an HSA files Form 8889 with their return. The Code W figure has a specific home on that form, and mixing it up with your direct contributions is a common filing mistake.
- Line 9 is where the Code W total goes. If you have more than one W-2, add them and enter the combined figure.3Internal Revenue Service. Instructions for Form 8889 (2025)
- Line 2 is only for contributions you made directly to the HSA yourself, outside of payroll. Do not put your payroll deductions here. They are already inside Code W.3Internal Revenue Service. Instructions for Form 8889 (2025)
The form then measures your combined contributions against the annual limit for your coverage type. Anything you reported on Line 2 becomes an above-the-line deduction, so you get the tax break whether or not you itemize.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The Code W amount produces no additional deduction, because that money was never taxed to begin with.
Staying Under the 2026 Limits
Every dollar counts against a single annual cap: employer contributions, your cafeteria-plan deductions, and anything you deposit directly. The 2026 limits are:2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
- $4,400 for self-only HDHP coverage
- $8,750 for family HDHP coverage
- An additional $1,000 catch-up if you are 55 or older
So if your W-2 shows $3,000 in Code W and you have self-only coverage, you have $1,400 of room left for direct contributions before you hit the ceiling.4Office of the Law Revision Counsel. 26 U.S. Code 223 – Health Savings Accounts
If the Code W Amount Looks Wrong
Start with your employer’s payroll or HR department. Mismatches often trace back to mid-year plan changes, contributions that straddled pay periods at year-end, or employer deposits that posted in January but were coded to the prior year.
Once the error is confirmed, your employer must issue a corrected Form W-2c.5Internal Revenue Service. About Form W-2 C, Corrected Wage and Tax Statements Wait for it before you file. A wrong Code W figure carries straight through to Form 8889: overstated, and it can look like you blew past the contribution limit; understated, and you may lose part of your deduction.6Social Security Administration. Helpful Hints to Forms W-2c/W-3c Filing
If the W-2c is dragging and the filing deadline is close, file an extension rather than submit numbers you know are wrong. Attaching an explanation and filing with your own figures is a fallback, but it creates more work later.
What Happens If Contributions Go Over the Limit
Excess contributions get hit with a 6% excise tax for every year the money sits in the account uncorrected.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts and Annuities You report it on Form 5329, Part VII, and it flows to Schedule 2 of your 1040. The excess also becomes taxable income.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
You can avoid both penalties by pulling the excess out of the HSA, along with any earnings it generated, before your tax filing deadline including extensions.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The withdrawn earnings get reported as other income on the return for the year you take them out.
The 6% tax is not a one-time hit. Leave $500 of excess in the account and you owe $30 this year, another $30 next year, and so on, until you either withdraw the excess or contribute less than the limit in a future year and let the unused room absorb it.