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.
Wages & federal tax withheld
The two boxes every W-2 recipient looks at first — taxable wages and federal income tax held back.
Box 1 — Wages, tips, other compensation
Your taxable federal wages for the year — gross pay minus pre-tax deductions like traditional 401(k), Section 125 cafeteria plan contributions, and pre-tax HSA.
Box 2 — Federal income tax withheld
Total federal income tax your employer withheld from your paychecks during the year, based on your Form W-4 elections.
Social Security (FICA OASDI)
Wages subject to Social Security and the 6.2% tax — capped at the annual wage base.
Box 3 — Social security wages
Your wages subject to Social Security tax, capped at the annual wage base. Differs from Box 1 because traditional 401(k) deferrals are not excluded.
Box 4 — Social security tax withheld
The Social Security tax your employer withheld — exactly 6.2% of Box 3 (plus Box 7 tips), capped at 6.2% of the annual wage base.
Medicare (FICA HI)
Medicare wages and the 1.45% tax, plus 0.9% Additional Medicare Tax above $200,000.
Box 5 — Medicare wages and tips
Your wages subject to Medicare tax. Unlike Social Security, there is no wage base cap — Box 5 can exceed Box 3 on high salaries.
Box 6 — Medicare tax withheld
1.45% of Box 5, plus 0.9% Additional Medicare Tax on the portion of Box 5 above $200,000 at any single employer.
Dependent care & nonqualified plans
Dependent care FSA benefits and 409A deferred-comp distributions.
Box 10 — Dependent care benefits
Total dependent care benefits your employer paid (including through a Section 129 dependent care FSA). Up to $5,000 MFJ can be excluded from Box 1.
Box 11 — Nonqualified plans
Distributions from a nonqualified deferred compensation plan (Section 409A), or certain amounts included in Box 1 from a prior year's elective deferral.
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.
Box 13 — Statutory employee · Retirement plan · Third-party sick pay
Three checkboxes (not dollar amounts): Statutory employee, Retirement plan coverage, Third-party sick pay. Each has separate tax-return implications.
Box 14 — Other (state disability, union dues, RRTA, NYC SDI, and more)
Free-form 'Other' box used by employers for items not covered elsewhere — state disability insurance, union dues, uniform allowances, educational assistance above $5,250, etc.
State income tax (Boxes 15–20)
State identification and withholding — multi-state workers and remote employees should read this one.
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.
Sources
W-2 box definitions per IRS General Instructions for Forms W-2 and W-3 and IRC §6051. Contribution limits and thresholds current for tax year 2025.