Taxstra Logo
IRS Form Guide

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

IRS Form Guides>W-2 Box 12 Codes

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

CodeWhat it reportsTax 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
Reading the tax effect column
"Reduces box 1" means the amount was already taken out of your taxable wages, so you do not deduct it again. "Already in wages" means it was added in, so you do not report it a second time. "Action needed" means the amount generates additional tax on Schedule 2.

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

Exercise price paid$10,000
Value at exercise$60,000
Box 12 code V, already in box 1 wages$50,000
Sale proceeds, sold same day$60,000
Basis per the 1099-B$10,000
Correct basis$60,000
Phantom gain if you file the 1099-B as issued$50,000

Illustrative arithmetic only. Your figures depend on your grant terms and sale timing.

Watch Out

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 12Box 14
CodesFixed IRS list, same meaning everywhereEmployer defined, no standard
Typical contentsRetirement deferrals, HSA, health coverage cost, option incomeState disability, union dues, pension pickups, after-tax deductions
Tax software behaviorMapped automatically by codeOften requires you to categorize it manually
Where it can change your returnSchedule 2 additional taxes, Forms 8889 and 8839State returns, especially New York and New Jersey
Taxstra CPA Tip

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

Code DD reports the total cost of your employer-sponsored health coverage, counting both the employer and employee share. It is informational only. It is not taxable income, it is not a deduction, and it does not change your refund. It exists so employees can see what their coverage actually costs.

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.

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.

Book a Free Consultation