US Tax Tools

W-2 Box Guide — Every Box Explained

Your W-2 (Wage and Tax Statement) has 20 boxes plus Box 12's alphabet-soup codes and most employees only look at Boxes 1 and 2. This guide explains the 18 most commonly questioned W-2 boxes, what each one feeds on Form 1040, and what to double-check against your final pay stub before you file.

All W-2 boxes at a glance

Box What it reports Where it goes on your return
Box 1 Wages, tips, other compensation Form 1040, Line 1a
Box 2 Federal income tax withheld Form 1040, Line 25a
Box 3 Social security wages Not reported on 1040 directly.
Box 4 Social security tax withheld Not reported on 1040 directly (except for excess from multiple employers — Schedule 3, Line 11).
Box 5 Medicare wages and tips Not reported on 1040 directly.
Box 6 Medicare tax withheld Feeds Form 8959 (Additional Medicare Tax); not on 1040 directly.
Box 10 Dependent care benefits Form 2441, Part III — Dependent Care Benefits.
Box 11 Nonqualified plans Included in Box 1 (Line 1a on 1040) — Box 11 is informational for Social Security earnings.
Box 12 Codes (401(k), HSA, health coverage, ISO, and more) Varies by code. Some feed Form 8889 (HSA), others Form 3903 (moving), etc. Many are informational only.
Box 12 Code D Elective deferrals to a 401(k) plan Already reflected in Box 1 (reduces it). Feeds Form 8880 (Saver's Credit).
Box 12 Code DD Cost of employer-sponsored health coverage None — informational only.
Box 12 Code E Elective deferrals to a 403(b) plan Already reflected in Box 1. Feeds Form 8880 (Saver's Credit).
Box 12 Code W Employer and employee HSA contributions Must be reconciled on Form 8889, Part I.
Box 12 Code AA Roth 401(k) contributions Already in Box 1. Feeds Form 8880 (Saver's Credit).
Box 12 Code BB Roth 403(b) contributions Already in Box 1. Feeds Form 8880 (Saver's Credit).
Box 13 Statutory employee · Retirement plan · Third-party sick pay Varies — statutory employee amounts go to Schedule C; retirement plan box affects IRA deductibility.
Box 14 Other (state disability, union dues, RRTA, NYC SDI, and more) Varies by item — some are deductible, some informational, some already in Box 1.
Box 15 State · Employer's state ID number Reported on the corresponding state return — not on Form 1040.

Wages & federal tax withheld

The two boxes every W-2 recipient looks at first — taxable wages and federal income tax held back.

Social Security (FICA OASDI)

Wages subject to Social Security and the 6.2% tax — capped at the annual wage base.

Medicare (FICA HI)

Medicare wages and the 1.45% tax, plus 0.9% Additional Medicare Tax above $200,000.

Dependent care & nonqualified plans

Dependent care FSA benefits and 409A deferred-comp distributions.

Box 12 — coded amounts

The catch-all coded box — 401(k), 403(b), HSA, Roth, and the big informational DD (employer health coverage cost).

Box 12 — Codes (401(k), HSA, health coverage, ISO, and more)

Up to four labeled amounts (12a–12d) using IRS codes. Common codes: D (401(k) elective deferral), DD (employer health coverage cost), W (employer + employee HSA contributions), AA (Roth 401(k)).

Box 12 Code D — Elective deferrals to a 401(k) plan

Your traditional (pre-tax) 401(k) elective deferrals. Reduces Box 1 dollar-for-dollar, up to the annual §402(g) elective deferral limit (higher with age-50 catch-up and SECURE 2.0 ages-60–63 super-catch-up).

Box 12 Code DD — Cost of employer-sponsored health coverage

The total cost (employer + employee share) of your employer-sponsored group health coverage. Informational only — does not affect your tax.

Box 12 Code E — Elective deferrals to a 403(b) plan

Your traditional (pre-tax) 403(b) elective deferrals. Reduces Box 1 up to the annual §402(g) limit, with a special 15-year catch-up for long-tenured employees of certain nonprofits.

Box 12 Code W — Employer and employee HSA contributions

Total Health Savings Account contributions — both employer and employee (via pre-tax payroll). Capped at the §223 annual HSA limit for your HDHP coverage tier, plus the $1,000 age-55+ catch-up under §223(b)(3)(B)(ii).

Box 12 Code AA — Roth 401(k) contributions

Your designated Roth 401(k) contributions. Already included in Box 1 (taxed now), but qualified distributions in retirement are tax-free.

Box 12 Code BB — Roth 403(b) contributions

Your designated Roth 403(b) contributions. Already included in Box 1 (taxed now); qualified distributions are tax-free.

Box 13 checkboxes & Box 14 other

Statutory employee, retirement plan coverage, third-party sick pay, plus state disability insurance and union dues.

State income tax (Boxes 15–20)

State identification and withholding — multi-state workers and remote employees should read this one.

Box 12 codes — complete list

All 30 IRS Box 12 codes, per the IRS General Instructions for Forms W-2 and W-3. A W-2 shows up to four per employer (12a–12d).

Code Meaning Tax treatment
A Uncollected Social Security or RRTA tax on tips Not withheld — you owe it (Schedule 2)
B Uncollected Medicare tax on tips Not withheld — you owe it (Schedule 2)
C Taxable cost of group-term life insurance over $50,000 Included in Box 1 — already taxed
D Elective deferrals to a 401(k) plan Pre-tax; reduces Box 1
E Elective deferrals to a 403(b) plan Pre-tax; reduces Box 1
F Elective deferrals to a 408(k)(6) salary-reduction SEP Pre-tax; reduces Box 1
G Elective deferrals to a 457(b) plan Pre-tax; reduces Box 1
H Elective deferrals to a 501(c)(18)(D) plan Pre-tax; reduces Box 1
J Nontaxable sick pay Not taxable — informational
K 20% excise tax on excess golden parachute payments Additional tax already withheld
L Substantiated employee business expense reimbursements Not taxable — informational
M Uncollected Social Security or RRTA tax on group-term life over $50,000 (former employees) Not withheld — you owe it (Schedule 2)
N Uncollected Medicare tax on group-term life over $50,000 (former employees) Not withheld — you owe it (Schedule 2)
P Excludable moving expense reimbursements (U.S. Armed Forces only) Not taxable — informational
Q Nontaxable combat pay Not taxable — may still count as earned income for EITC
R Employer contributions to an Archer MSA Not taxable — informational; may need Form 8853
S Employee salary-reduction contributions to a 408(p) SIMPLE Pre-tax; reduces Box 1
T Employer-provided adoption benefits Not taxable up to the exclusion limit — Form 8839
V Income from exercise of nonstatutory stock options Included in Boxes 1, 3, 5 — already taxed
W Employer and employee HSA contributions via a cafeteria plan Pre-tax; reduces Box 1 — reconcile on Form 8889
Y Deferrals under a Section 409A nonqualified deferred compensation plan Not yet taxable — informational
Z Income under a failed Section 409A plan Taxable now, plus a 20% additional tax
AA Designated Roth contributions to a 401(k) plan After-tax; already included in Box 1
BB Designated Roth contributions to a 403(b) plan After-tax; already included in Box 1
DD Cost of employer-sponsored health coverage Not taxable — informational only
EE Designated Roth contributions to a governmental 457(b) plan After-tax; already included in Box 1
FF Permitted benefits under a Qualified Small Employer HRA (QSEHRA) Not taxable — informational
GG Income from qualified equity grants under Section 83(i) Deferred taxation — informational until income is recognized
HH Aggregate deferrals under Section 83(i) elections Deferred taxation — informational
II Medicaid waiver payments excluded from gross income under Notice 2014-7 Not taxable — excluded from Box 1

Reconciling your W-2 at tax time? Use the paycheck calculator to verify expected federal, Social Security, and Medicare withholdings on your salary, then the federal income tax calculator to estimate your refund or balance owing before April 15.

Frequently asked questions

What do the W-2 boxes mean?

Each numbered box on your W-2 reports a specific piece of pay or withholding — wages, federal/state tax withheld, Social Security and Medicare wages and tax, plus coded benefit amounts in Box 12. See the quick-reference table above for what each box reports and where it goes on your return.

Why is Box 1 lower than Box 3 and Box 5?

Pre-tax deductions like traditional 401(k)/403(b) elective deferrals and Section 125 cafeteria-plan contributions reduce Box 1 (taxable federal wages) but are not exempt from Social Security or Medicare tax the same way, so Box 3 and Box 5 stay higher.

What are the W-2 Box 12 codes?

Box 12 uses two-letter IRS codes to identify specific types of pay or benefits — up to four per W-2. The most common are D (401(k) deferral), DD (employer health coverage cost, informational only), W (HSA contributions), and AA (Roth 401(k)). See the complete code list above.

What should I check before filing?

Match your W-2 boxes against your final (year-end) pay stub's YTD totals. If you had multiple employers, each issues its own W-2 — enter each separately; Box 1 amounts from all employers sum on Form 1040, Line 1a.

Sources

W-2 box definitions per IRS General Instructions for Forms W-2 and W-3 and IRC §6051. Box structure is statutory and stable year to year; year-indexed limits shown on each box's page update from central config.