W-2 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).
At a glance — Box 12 Code D
- Box name
- Elective deferrals to a 401(k) plan
- Reports to
- Already reflected in Box 1 (reduces it). Feeds Form 8880 (Saver's Credit).
- Check against
- Your 401(k) statement showing YTD employee pre-tax deferrals.
What Box 12 Code D means
Code D reports your traditional (pre-tax) elective deferrals to a 401(k) plan. These contributions reduce Box 1 (taxable federal wages) but not Box 3 (Social Security) or Box 5 (Medicare) — you still pay FICA on them now, but federal income tax is deferred until withdrawal.
The §402(g) elective deferral limit caps what you can contribute in a year. Participants age 50+ can add the age-50 catch-up; SECURE 2.0 added a super-catch-up for ages 60–63 that replaces the age-50 amount in that age window. Excess deferrals must be withdrawn by April 15 of the following year or face double taxation. §415(c) separately caps total employee + employer additions.
Tax return implications
- Already reduces Box 1 — you do not separately deduct code D on your tax return.
- Contributes to the Saver's Credit (Form 8880) if your AGI is below the phase-out.
- Excess deferrals above the §402(g) limit must be pulled by April 15 via a corrective distribution or taxed twice.
Common pitfalls & things to check
- If you had multiple employers, each plan has its own contribution cap — but YOU cannot exceed the §402(g) limit total across all 401(k)s. Track the aggregate yourself.
- Roth 401(k) contributions go in code AA, not code D. Code D is traditional (pre-tax) only.
- 403(b) elective deferrals use code E; 457(b) uses code G; SIMPLE uses code S.
For 2025 returns (filed by April 15, 2026)
- §402(g) elective deferral limit
- $23,500
- Age-50 catch-up $7,500 · SECURE 2.0 ages-60–63 super-catch-up $11,250 · §415(c) total additions $70,000. Combined across code D + AA (traditional + Roth).
Values sourced from central tax-year config at build time — update automatically on FY rollover.
Related W-2 boxes
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 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).
Reconciling your W-2 at tax time? Use the paycheck calculator to verify expected federal, Social Security, and Medicare withholdings on your salary, and the federal income tax calculator to estimate your refund or balance owing before you file.
Related Calculators
Paycheck Calculator
Federal, state, FICA withholding, net take-home, W-4 alignment
Federal Income Tax Calculator
10–37% brackets, $15,750 standard deduction, progressive calculation
W-4 Withholding Optimizer
Form W-4 allowances, correct federal withholding, avoid penalties
FICA & Social Security
6.2% SS to $176,100, 1.45% Medicare, 0.9% additional Medicare
Tax Refund Estimator
Estimate federal refund, withholding vs liability, adjustments
401(k) Calculator
Contribution limits, employer match, tax-deferred growth
Sources
W-2 box definitions per IRS General Instructions for Forms W-2 and W-3 and IRC §6051. Rates and thresholds current for tax year 2025 (file by April 15, 2026); 2026 figures included where published.