U.S. · W-2 box 12
W-2 box 12 code W.
HSA money that came through payroll, and how it counts toward your limit.
Code W is the money that went into your health savings account through your employer. That includes your own payroll contributions made through a cafeteria plan, not only what the employer added. It counts toward the 2026 HSA limit of $4,400 self-only or $8,750 family, and goes on Form 8889.
Check your code W amount
Result
What code W means
IRS description: Code W: Employer contributions to a health savings account (HSA). Show any employer contributions (including amounts the employee elected to contribute using a section 125 (cafeteria) plan) to an HSA.
Many people read code W as "my employer's gift." The IRS definition is wider: it includes amounts the employee elected to contribute using a section 125 cafeteria plan. So if you set up an HSA deduction on your paycheck and the employer also seeds the account, both are in W. Publication 15-B says the same thing for employers: contributions through a cafeteria plan are reported in box 12 with code W.
The Form 8889 instructions confirm the treatment on your side. Employer contributions, including payroll contributions through a cafeteria plan, are entered on line 9 and "should be shown on Form W-2, box 12, code W." Line 2 is only for money you put in yourself, outside payroll. If you simply add up your bank deposits and your pay stub deductions, you can double count or miss one of these buckets.
Where code W shows up on your W-2 and return
- Box 1: normally not included. An employer contribution, including your cafeteria-plan payroll contribution, is not subject to income tax withholding or Social Security and Medicare tax when it is reasonable to believe it will be excludable.
- When it is included: if employer contributions are not excludable, the IRS says they must also be reported in boxes 1, 3 and 5.
- Form 8889: the code W amount goes on line 9 (employer contributions). Your own direct deposits go on line 2.
- Form 1040: you file Form 8889 with your return. The code W amount is not added to wages.
Worked example
Code W shows 3000.00 and you also deposited $1,000 from your own bank. If the $3,000 is a mix of $1,200 from the employer and $1,800 from your paycheck through the cafeteria plan, it is still all code W, so $3,000 goes on Form 8889 line 9 and the $1,000 on line 2. With family coverage the 2026 limit is $8,750, so total contributions of $4,000 leave $4,750 of room. At 55 or older the limit is $9,750.
Limits and what to check
For 2026 the HSA limit is $4,400 for self-only coverage and $8,750 for family coverage (Rev. Proc. 2025-19), plus $1,000 if you are 55 or older at the end of the year. The limit applies to all contributions combined, so code W plus your own deposits must stay under it. The Form 8889 instructions say Code section 4973 imposes a 6% tax on excess HSA contributions, reported on Form 5329, so over-contributing has a cost. Remember the calculator assumes you had qualifying high-deductible coverage for the whole year, which also matters.
Common mistakes
- Assuming code W is only the employer's money. It includes cafeteria-plan payroll deductions you chose.
- Putting the code W amount on Form 8889 line 2. Employer and payroll money goes on line 9.
- Counting W and your own deposits separately against two different limits. They share one limit.
- Looking for HSA money in code DD. The IRS says HSA contributions are not reported in DD.
See every code in one searchable table on the W-2 box 12 codes lookup.
Sources
Primary sources opened on November 1, 2026. The plain-English parts of this page are our summary of them, not IRS guidance.
- IRS, General Instructions for Forms W-2 and W-3 (2026), Box 12, Codes (read 2026-11-01): code W definition and the box 1, 3 and 5 rule
- IRS, Instructions for Form 8889 (2025 edition, latest read) (read 2026-11-01): line 9, line 2 and the 6% excess tax
- IRS Revenue Procedure 2025-19: 2026 HSA limits (read 2026-11-01): 2026 HSA limits
- IRS, Publication 15-B (2026), Employer's Tax Guide to Fringe Benefits (read 2026-11-01): cafeteria-plan HSA reporting
Frequently asked questions
What does code W mean on a W-2?
Code W reports employer contributions to your health savings account, including amounts you elected to contribute through a section 125 cafeteria plan.
Does code W include my own payroll contributions?
Yes, if they were made through a cafeteria plan. The IRS treats those as employer contributions on Form 8889 and in box 12.
Where does code W go on my tax return?
On Form 8889, line 9, which you file with Form 1040. It is not added to your wages.
What is the HSA limit for 2026?
$4,400 for self-only coverage and $8,750 for family coverage, plus $1,000 if you are 55 or older. Code W counts toward it.
Is code W taxable?
Normally not, because it is excludable. If an employer contribution is not excludable, the IRS says it must also be included in boxes 1, 3 and 5.
What if my total went over the limit?
Excess HSA contributions face a 6% tax under Code section 4973 unless corrected. Ask your HSA custodian about removing the excess.
Not tax advice
This page summarizes IRS instructions written for employers and is not tax advice. Your payroll provider, plan administrator or a tax professional can confirm what a code means on your own form. Everything runs in your browser; nothing you enter is sent anywhere.