Taxes

HSA contributions on Form W-2, box 12, code W

Last reviewed: November 23, 2026. Figures cited to official sources below.

If your employer put money into your HSA — or you contributed through a qualifying cafeteria-plan payroll deferral — that amount is generally reported in box 12 of Form W-2 with code W. Personal deposits you made from a bank account often do not appear there.

Estimate your 2027 federal tax savings

This uses official 2027 contribution limits and the federal tax rate you choose. It is an illustration, not a tax return and not a guarantee.

2027 federal limit for this selection: $4,500. Pick the rate closest to your situation, or ask a tax professional. These are illustration rates, not a filing tool.

Illustrated federal income-tax reduction

$990

Limits: IRS Rev. Proc. 2026-24 ($4,500 self-only, $9,000 family for 2027). Catch-up: IRC §223(b)(3) ($1,000). This estimate does not apply a state tax rate. California does not follow the federal HSA deduction; New Jersey treatment should be confirmed with the state.

Draft Publication 969 says employer contributions are shown with code W in box 12 of Form W-2. Publication 15-B tells employers the same reporting rule. Contributions you make through a cafeteria-plan salary reduction are treated as employer contributions, so they generally belong in that code W total as well.

Code W amounts are usually already excluded from your taxable wages. You do not also deduct the same dollars as a personal HSA contribution on Form 8889. You still use Form 8889 to test the combined total — your deposits plus employer amounts — against the annual limit.

If you only contributed from your own funds outside payroll, it is normal for code W to be blank or missing. Those personal contributions are generally claimed as an adjustment to income on Form 8889, not as a W-2 exclusion. See personal HSA contributions.

Worked example

Payroll and a personal deposit in the same year

Sam has family eligible coverage for all of 2027 and is under 55, so the contribution limit is $9,000. Sam’s employer contributes $2,000 through payroll. That $2,000 appears in box 12 as code W and is already excluded from Sam’s wages. Sam also deposits $3,000 from a checking account.

The combined total is $5,000, under the $9,000 cap. Sam does not deduct the $2,000 again. The $3,000 personal deposit is the amount Sam generally deducts on Form 8889. Both amounts count toward the limit.

Words used on this page

Code W
The Form W-2 box 12 code used to report employer HSA contributions, including cafeteria-plan salary reductions.
Cafeteria plan
A qualifying IRC §125 plan that can let you reduce salary to fund benefits, including an HSA.
Exclusion
An amount left out of taxable wages, rather than deducted later on the return.

Code W reports employer or cafeteria-plan contributions that you can receive only as a qualified individual — generally someone covered by an HSA-eligible health plan. If you no longer have eligible coverage at work, get an hsa plan quote to keep contributing for later months.

Key takeaways

  • Box 12, code W, is the usual place employer and cafeteria-plan HSA contributions appear on Form W-2.
  • Those amounts are generally excluded from wages; do not deduct the same dollars again.
  • A personal contribution made outside payroll often will not appear on the W-2, and is instead deducted on Form 8889 if you were eligible.
  • All contributions still share one annual cap: $4,500 or $9,000 for 2027, plus $1,000 catch-up if you qualify.

Sources: Publication 15-B (Health Savings Accounts); draft 2026 Publication 969 (draft); Rev. Proc. 2026-24; IRC §223. Publication 15-B explains employment-tax treatment and may illustrate 2026 dollar limits; 2027 contribution and HDHP figures on this page come from Rev. Proc. 2026-24. This is educational information, not tax advice.

Common questions

What is W-2 box 12, code W?

It reports employer contributions to your HSA, including amounts you deferred through a cafeteria plan. The amount is generally already excluded from your taxable wages.

Why is my HSA contribution not on my W-2?

If you contributed from your own funds outside payroll, that amount often will not appear as code W. You generally claim it on Form 8889 instead. If an employer contribution is missing, ask the employer’s payroll department.

Does code W mean I cannot contribute more?

Not by itself. Code W is only the employer or cafeteria-plan piece. You may still be able to make personal contributions up to the remaining 2027 limit if you are an eligible individual.

Keep reading

Get an HSA plan quote

Share your ZIP and coverage type — about 60 seconds, no obligation. Premium tax credits are available only if you enroll through the Marketplace.

Get an HSA plan quote

Get a quote on an HSA-eligible plan

Takes about 60 seconds. We’ll look at HSA-eligible plans in your ZIP. Premium tax credits are available only if you enroll through the Marketplace. Submitting is optional — the guides stay free to read.

Step 1 of 4

We use this to look at HSA-eligible plans available where you live.

Takes about 60 seconds. No obligation.

Get an HSA plan quote