W-2 Box 12 Code W: What the HSA Contribution Code Means and Why It Is Not Taxable

A W-2 Box 12 code W entry combines true employer HSA contributions with the employee's own pre-tax payroll HSA contributions into one number, per IRS instructions for Forms W-2 and W-3. This guide explains what the code includes, the 2026 IRS contribution limits, what happens if the number is too high, and how to report it on Form 8889.

  • Code W combines true employer HSA contributions and the employee's own pre-tax payroll HSA contributions into one figure, per the IRS General Instructions for Forms W-2 and W-3.
  • The 2026 IRS HSA contribution limit is 4,400 dollars for self-only coverage and 8,750 dollars for family coverage, with a 1,000 dollar catch-up for employees 55 and older (IRS Revenue Procedure 2025-19).
  • Code W amounts that qualify for the tax exclusion are left out of Box 1, 3 and 5 wages, so they do not add to taxable income or Social Security wages.
  • Every HSA owner files Form 8889 with their federal return, even when payroll code W is the only source of contributions for the year.
  • A code W number above the annual limit is a payroll issue to flag before filing, not a normal result, and can trigger a 6 percent excise tax if not corrected.

A W-2 arrives in January and Box 12 has a letter code W next to a dollar amount the employee does not remember agreeing to. Most of the time the number is correct. It just is not what most people expect, because it adds together two different sources of health savings account money into one line.

What does box 12 code W mean on a W-2?

Box 12 code W reports the total amount an employee's health savings account received through payroll during the year. The IRS instructions for Forms W-2 and W-3 direct employers to report all employer contributions, including an employee's own contributions made through a cafeteria plan, in Box 12 with code W. That means code W is almost never just the employer's check. It is the employer's direct contribution plus every pre-tax dollar the employee chose to redirect from their own paycheck into the HSA.

Does code W include the money I put in myself?

Yes, when the employee elected HSA contributions through payroll under a Section 125 cafeteria plan. The IRS treats an employee's pre-tax cafeteria plan election the same way it treats a true employer contribution for W-2 reporting, because both reduce the employee's taxable wages before the paycheck is issued. If an employee also mails money directly to their HSA custodian outside of payroll, using after-tax dollars, that amount does not appear anywhere on the W-2. It gets deducted separately on the employee's tax return.

How a code W number is usually built
Contribution sourceShows up in code W?Where it is deducted
Employer's direct HSA contributionYesNever taxed, no separate deduction needed
Employee's pre-tax payroll election (Section 125)YesNever taxed, no separate deduction needed
Employee's after-tax deposit to the HSA outside payrollNoDeducted on Form 8889, line 2

A quick math example

An employee elects 150 dollars a month pre-tax through payroll, for 1,800 dollars a year. The employer adds 50 dollars a month directly, for 600 dollars a year. Box 12 code W on that employee's W-2 reads 2,400 dollars, the combined total. Neither piece shows up in Box 1 wages, because both stayed under the 2026 self-only limit of 4,400 dollars.

Is a box 12 code W amount taxable?

No, not the portion that stays within the annual IRS limit. The IRS instructions state that code W amounts excludable from income are not included in Box 1, Box 3 or Box 5, so they never touch federal income tax, Social Security tax or Medicare tax. That is also why a Section 125 HSA election lowers an employer's FICA bill as well as the employee's, since both the employer and employee share of FICA is calculated on the reduced wage number. Code W works differently from code DD, which reports the total cost of health coverage rather than an HSA election, so the two boxes should never be added together.

Contributions that are not excludable, meaning they push the employee over the annual limit, are the exception. The IRS instructions specifically require employers to include any non-excludable HSA contribution back into Box 1, Box 3 and Box 5, so that portion is taxed like ordinary wages.

What if my code W number is higher than the IRS limit?

An excess HSA contribution is subject to a 6 percent excise tax for every year it stays in the account, reported on Form 5329, unless the employee withdraws the excess amount, along with any earnings on it, before the tax filing deadline. This usually happens when an employee changes jobs mid-year and both employers contributed close to the full limit, or when a family-to-self-only coverage change was not updated with payroll in time. Catching an over-limit code W number before filing is the cheapest way to fix it, since a timely withdrawal avoids the excise tax entirely.

How do I report code W on my tax return?

Every HSA owner attaches Form 8889 to Form 1040, even when payroll is the only source of contributions for the year. The code W amount from the W-2 goes on Form 8889 to confirm it falls within the annual limit, while any contributions made outside of payroll are entered separately and deducted directly on the form. The IRS instructions for Forms W-2 and W-3 point filers to Form 8889 for the full HSA reporting rules.

Who actually sets up this payroll coding?

An employer's Section 125 cafeteria plan administrator is who decides how HSA elections flow through payroll and land on the W-2 as code W. Benecor Health sets up the written cafeteria plan document, configures the payroll election for HSA contributions, and confirms the coding matches IRS instructions before W-2s go out, so HR is not fielding code W questions every January. Employees who also want to understand a Section 125 line in Box 14 on the same W-2 can see how that entry is separate from the HSA amount in Box 12.

Sources: IRS General Instructions for Forms W-2 and W-3, 2026 edition (irs.gov). IRS Revenue Procedure 2025-19. IRS Form 8889 instructions. Internal Revenue Code Section 4973.

Frequently asked questions

Does code W include my own HSA contributions or only my employer's?
Code W includes both. The IRS instructions require employers to combine their own contribution with any amount the employee elected pre-tax through a cafeteria plan into one code W figure on the W-2.
Is the amount in box 12 code W taxable income?
The portion within the 2026 IRS limit, 4,400 dollars self-only or 8,750 dollars family, is not taxable and is already left out of Box 1, 3 and 5. Only an amount over the limit gets added back into taxable wages.
What if I also put money into my HSA outside of payroll?
Outside contributions, made with after-tax dollars directly to the HSA custodian, never appear in code W. They still count toward the same annual limit and get deducted separately on Form 8889.
Do I still need Form 8889 if code W is my only HSA contribution?
Yes. Every HSA owner attaches Form 8889 to their federal return each year the account received contributions or paid for expenses, even when payroll is the only source of money going in.
What happens if my code W amount is over the 2026 limit?
The excess is subject to a 6 percent excise tax for each year it remains in the account, reported on Form 5329, unless it is withdrawn along with any earnings before the tax filing deadline.
Does code W affect my Social Security wages in box 3?
No, not the portion that qualifies for the tax exclusion. Excludable code W amounts are left out of Box 3 Social Security wages the same way they are left out of Box 1.
Why is my code W amount different from what I expected?
The most common reason is that code W combines the employer's contribution with the employee's own payroll election, so the number is usually higher than either piece alone. A mid-year coverage change or job change can also affect the total.
Can my employer fix a wrong code W amount after my W-2 is issued?
Yes. An employer can issue a corrected W-2, Form W-2c, if the code W figure was reported incorrectly. Employees who spot a mismatch against their pay stubs should raise it with payroll or HR before filing.

Continue reading

About the author

Muhammad Mudassir — Co-founder & Health Tech Sales Lead

Muhammad Mudassir, who goes by Moe, is a co-founder and health technology operator focused on Section 125 cafeteria plans and zero-cost employer benefits. He has spent years getting employers enrolled in compliant cafeteria plans, onboarding nationwide workforces into the WoW Health and UnifyWell ecosystems, and translating the mechanics of FICA recapture into language that HR, finance, and ownership can act on.

moe@benecorhealth.com · LinkedIn