Employer contributions to your HSA appear on your W-2 in Box 12 with the letter code W. The dollar amount next to Code W is a combined figure: what your employer deposited into your Health Savings Account plus any money you routed in yourself through pre-tax payroll deductions under a Section 125 cafeteria plan.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) The IRS treats cafeteria-plan deductions as employer contributions because the money is taken out before taxes touch your paycheck.
What the Code W Number Includes and Excludes
Code W captures two categories of money and only two: direct employer deposits and your own pre-tax payroll contributions. Anything you sent to your HSA outside of payroll — a personal check to the custodian, an online transfer from your checking account — is not in that number and will not appear anywhere on your W-2. Those direct contributions have their own line on Form 8889.
If you changed jobs during the year, each W-2 carries its own Code W amount. Add them together when you file. The contribution limit applies to the total going into your account, regardless of how many employers helped fund it.
Why the Code W Amount Isn’t in Your Taxable Wages
Box 1 of your W-2 is lower than your gross salary partly because Code W contributions were excluded from income before your employer calculated withholding.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The same dollars also escape Social Security and Medicare taxes, a benefit you do not get when you contribute to your HSA directly from your bank account.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)
A direct contribution still gets you an income tax deduction on your return, but you already paid the 7.65% payroll tax on that money. This is why the same annual dollar amount contributed through payroll is worth more than one written by check.
Because pre-tax HSA contributions also reduce your adjusted gross income, they can widen your eligibility for income-based credits like the Earned Income Tax Credit or education credits.
Moving the Code W Amount to Form 8889
Anyone who contributed to or took distributions from an HSA has to file Form 8889 with their return. The Code W figure has a specific home there:
- Line 9 is where the Box 12, Code W total goes. If you have more than one W-2 with a Code W, combine them first.3Internal Revenue Service. Instructions for Form 8889 (2025)
- Line 2 is only for contributions you made outside of payroll. Do not repeat your Code W amount here; payroll deductions are already counted as employer contributions.3Internal Revenue Service. Instructions for Form 8889 (2025)
The form then measures your total contributions against the annual limit for your coverage type. Direct contributions on Line 2 become an above-the-line deduction, meaning you claim them whether or not you itemize.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The Code W dollars do not generate any further deduction because they were never taxed in the first place.
If your employer’s deposits for one year actually posted in a different year, the Form 8889 instructions include a worksheet for sorting the timing out.3Internal Revenue Service. Instructions for Form 8889 (2025)
2026 Contribution Limits the Code W Amount Counts Against
The IRS adjusts HSA limits each year for inflation. For 2026:2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
- Self-only HDHP coverage: $4,400
- Family HDHP coverage: $8,750
- Catch-up contribution at age 55 or older: an extra $1,000 on top of the above
Employer contributions, cafeteria plan deductions, and any direct contributions all share one cap.4Office of the Law Revision Counsel. 26 U.S. Code 223 – Health Savings Accounts If your Code W amount reads $3,000 and you have self-only coverage, you can put in up to $1,400 more on your own, and not a dollar past $4,400 combined.
If the Code W Amount Looks Wrong
Contact payroll or HR first when the figure does not match your records. Common causes are mid-year plan changes, contributions that straddle year-end pay periods, and deposits that landed in January but were coded to the prior year.
Once the employer confirms an error, they 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 amount flows straight into Form 8889: overstated, it can look like you blew past the contribution limit; understated, you may miss part of your deduction.6Social Security Administration. Helpful Hints to Forms W-2c/W-3c Filing
If the deadline is closing in and the W-2c has not arrived, you can file an extension or file with the number you believe is correct and attach an explanation. Filing with a figure you already know is wrong creates a larger problem to unwind later.
What Happens If Total Contributions Exceed the Limit
Going over the annual cap triggers a 6% excise tax on the excess for every year it stays in the account.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts and Annuities The excess is also taxable income. You report the excise tax on Form 5329, Part VII, and it flows to Schedule 2 of your 1040.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
You can avoid both hits by withdrawing the excess, along with any earnings on it, before your tax filing deadline including extensions.2Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans For 2026 contributions that means April 15, 2027, or October 15, 2027 with an extension. 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 charge. Leave $500 of excess in the account and you owe $30 this year, $30 next year, and so on, until you either pull the excess out or a future year’s contributions come in low enough to absorb it.