W-2 Box 12 Codes
Search any code, see what it reports, and find out whether it is already baked into your taxable wages or still owes you something.
A guide by Taxstra Tax & Accounting · CPA-led tax strategy for business owners
Written by Bryan Martin, CPA, Managing Partner and Founder of Taxstra. Last updated August 15, 2026.
Quick answer
W-2 Box 12 uses IRS-defined letter codes to report items that do not fit elsewhere on the form. Most are informational or already reflected in box 1 wages, including codes D, DD, and AA. A handful, including A, B, K, and Z, create additional tax on Schedule 2 of your return.
Box 12 is where the W-2 puts everything that does not have its own box. Retirement deferrals, health coverage costs, stock option income, HSA contributions, and a handful of uncollected taxes all share the same small space, distinguished only by a letter code.
The practical question is almost always the same: does this code mean I owe more, or is it already handled? Use the lookup below to answer that for any code on your form.
Look Up Any Box 12 Code
Search by letter or by description. Every code the IRS currently defines.
30 of 30 codes shown
| Code | What it reports | Tax effect |
|---|---|---|
| A | Uncollected social security or RRTA tax on tips Your employer could not collect this from your paycheck. It gets added to your tax on Schedule 2. | Action needed |
| B | Uncollected Medicare tax on tips Same as code A, but the Medicare portion. Also flows to Schedule 2. | Action needed |
| C | Taxable cost of group-term life insurance over $50,000 The imputed value of employer-paid coverage above the exclusion. It is already included in boxes 1, 3, and 5. | Already in wages |
| D | Elective deferrals to a 401(k) plan Your pre-tax 401(k) contributions. Already excluded from box 1 wages, but still subject to social security and Medicare tax. | Reduces box 1 |
| E | Elective deferrals under a 403(b) salary reduction agreement The 403(b) equivalent of code D, common for teachers, hospital staff, and nonprofit employees. | Reduces box 1 |
| F | Elective deferrals under a 408(k)(6) salary reduction SEP Salary reduction SEP deferrals. Rare, since these plans could not be established after 1996. | Reduces box 1 |
| G | Elective deferrals and employer contributions to a 457(b) plan Governmental and tax-exempt deferred compensation. Can often be stacked with a 403(b) in the same year. | Reduces box 1 |
| H | Elective deferrals to a 501(c)(18)(D) tax-exempt plan Very rare legacy plan type. | Reduces box 1 |
| J | Nontaxable sick pay Excluded from boxes 1, 3, and 5. Informational only. | Not taxable |
| K | 20 percent excise tax on excess golden parachute payments Additional tax owed on excess parachute payments. Flows to Schedule 2. | Action needed |
| L | Substantiated employee business expense reimbursements Reimbursements under an accountable plan. Excluded from wages. | Not taxable |
| M | Uncollected social security or RRTA tax on group-term life (former employees) Applies to former employees only. Flows to Schedule 2. | Action needed |
| N | Uncollected Medicare tax on group-term life (former employees) The Medicare counterpart to code M. | Action needed |
| P | Excludable moving expense reimbursements paid to a member of the Armed Forces The moving expense exclusion now applies only to active-duty military moves under orders. | Not taxable |
| Q | Nontaxable combat pay Excluded from box 1, but you may elect to include it when computing the earned income credit. | Not taxable |
| R | Employer contributions to an Archer MSA Reported on Form 8853. Archer MSAs are largely closed to new participants. | Informational |
| S | Employee salary reduction contributions to a 408(p) SIMPLE plan SIMPLE IRA deferrals, common at small employers. | Reduces box 1 |
| T | Adoption benefits Excluded from box 1 but reported on Form 8839 to compute the taxable and excludable portions. | Informational |
| V | Income from exercise of nonstatutory stock options The spread at exercise. Already in box 1. This is the single biggest source of double-counted capital gains on tech returns. | Already in wages |
| W | Employer contributions to a health savings account Includes your own contributions made through a cafeteria plan. Reported on Form 8889. Do not deduct these again. | Not taxable |
| Y | Deferrals under a section 409A nonqualified deferred compensation plan Tracking only. Deferred amounts are not yet taxable. | Informational |
| Z | Income under a nonqualified deferred compensation plan that fails section 409A Already in box 1, and it carries an additional tax plus interest on Schedule 2. A red flag worth asking about. | Action needed |
| AA | Designated Roth contributions under a 401(k) plan After-tax Roth 401(k) contributions. Included in box 1 because you already paid tax on them. | Already in wages |
| BB | Designated Roth contributions under a 403(b) plan The 403(b) Roth equivalent of code AA. | Already in wages |
| DD | Cost of employer-sponsored health coverage Purely informational reporting. It is not taxable and it is not deductible. The most common code people mistake for a tax item. | Informational |
| EE | Designated Roth contributions under a governmental 457(b) plan Roth treatment inside a governmental 457(b). | Already in wages |
| FF | Permitted benefits under a qualified small employer HRA QSEHRA benefit amount. Affects premium tax credit eligibility. | Informational |
| GG | Income from qualified equity grants under section 83(i) Income recognized on a deferred equity grant election. | Already in wages |
| HH | Aggregate deferrals under section 83(i) elections Running total of deferred qualified equity grant income. | Informational |
| II | Medicaid waiver payments excluded from gross income Difficulty of care payments excluded under Notice 2014-7. Added to the form in recent tax years. | Not taxable |
The Four Categories That Matter
Twenty-nine codes collapse into four behaviors.
Pre-tax deferrals
Codes D, E, F, G, H, S
Money you put into a retirement plan before income tax. Already excluded from box 1. Still subject to social security and Medicare tax, which is why box 3 and box 5 are usually higher than box 1 on a saver's W-2.
Already added to wages
Codes C, V, AA, BB, EE, GG
Compensation the employer already included in box 1. Roth contributions, group-term life imputed income, and stock option spreads all live here. Reporting them again double taxes you.
Excluded or informational
Codes J, L, P, Q, R, T, W, Y, DD, FF, HH, II
Amounts kept out of taxable wages or reported for transparency. Several feed a separate form, such as W to Form 8889 and T to Form 8839, which computes the excludable portion.
Additional tax owed
Codes A, B, K, M, N, Z
Taxes the employer could not collect through payroll, plus the section 409A failure penalty. These add to your liability on Schedule 2 and are the only Box 12 codes that reliably increase what you owe.
The Code V Cost Basis Trap
The most expensive Box 12 error, and it is almost always the broker's fault.
When you exercise a nonstatutory stock option, the spread between what you paid and what the shares were worth is compensation. Your employer runs it through payroll, includes it in box 1, and reports it separately as code V.
That same amount also increases your cost basis in the shares, because you have already been taxed on it. Brokers are generally required to report only the exercise price as basis on Form 1099-B, not the compensation element. If you file what the 1099-B says, you pay tax twice on the same dollars.
Worked example
Illustrative arithmetic only. Your figures depend on your grant terms and sale timing.
The fix
Report the sale with the correct basis and use Form 8949 with the appropriate adjustment code to reconcile against the 1099-B. The same problem shows up on restricted stock unit sales, where the vesting income is in box 1 but the broker reports a basis of zero.Box 12 vs Box 14
One is standardized. The other is whatever your employer decided.
| Box 12 | Box 14 | |
|---|---|---|
| Codes | Fixed IRS list, same meaning everywhere | Employer defined, no standard |
| Typical contents | Retirement deferrals, HSA, health coverage cost, option income | State disability, union dues, pension pickups, after-tax deductions |
| Tax software behavior | Mapped automatically by code | Often requires you to categorize it manually |
| Where it can change your return | Schedule 2 additional taxes, Forms 8889 and 8839 | State returns, especially New York and New Jersey |
Taxstra Tip
If the letter you are trying to look up is not in the table above, you are almost certainly reading Box 14, not Box 12. Employers use it for things like NY 414(h) retirement pickups and NJ family leave insurance, both of which do change your state return. Those are covered in the Box 14 code guide.High-income W-2 employees with equity typically see codes D, DD, V, W, and AA together on one form. Each carries a separate planning question: whether the deferral should be traditional or Roth, whether the HSA is being used as a retirement account or a spending account, and whether supplemental withholding on equity is leaving a shortfall. For physicians and other high earners on a W-2, the full set of available levers is laid out in the W-2 physician planning guide, and equity purchase plans are covered in the ESPP tax guide.
Equity Compensation on Your W-2?
Codes V, Y, Z, GG, and HH all signal compensation structures where the reporting is easy to get wrong and expensive to fix. A Taxstra CPA will check it. The initial consultation is free.
Frequently Asked Questions
A W-2 Is Not the End of Your Tax Planning
Retirement plan selection, equity timing, HSA strategy, and entity structure on the side income all move the number. Book a free initial consultation with a Taxstra CPA.
Next Steps
Filing it yourself is fine. Optimizing it is where the money is.
Getting the form right keeps you out of trouble. The strategies below are what actually lower the bill.
RSU and stock option cost basis
Code V is already in your wages. Reporting the sale without adjusting basis taxes the same income twice.
The HSA triple tax advantage
Code W means the contribution already ran through payroll. Here is how to use the account properly.
W-2 physician tax planning
High-income W-2 earners have fewer levers, but the ones that exist are worth real money.
Want a CPA to run the numbers for you?
Free 30-minute call with a Taxstra CPA. No pressure, just the math for your situation.
Authoritative Sources
- IRS General Instructions for Forms W-2 and W-3
- IRS Form W-2, Wage and Tax Statement
- IRS Form 8889, Health Savings Accounts
- IRS Publication 525, Taxable and Nontaxable Income
- IRS Notice 2014-7, Difficulty of Care Payments
Citations reflect U.S. federal tax law as of the article's last reviewed date.
Related W-2 and Equity Compensation Guides
W-2 Box 14 Codes
The free-form box, and the state-specific entries that actually change your return.
RSU Cost Basis
The most expensive reporting error in tech compensation, and how to catch it.
RSU Tax Withholding
Why the default withholding rate leaves high earners short every April.
ESPP Tax Treatment
Qualifying versus disqualifying dispositions and the discount that becomes ordinary income.
