ustax.tools

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) plan's year-end statement of employee pre-tax deferrals — it should match code D exactly. Employer match and profit-sharing contributions won't appear here or anywhere else on the W-2.

What Box 12 Code D means

Code D reports your traditional, pre-tax elective deferrals to a 401(k) plan — the amount you chose to have withheld from each paycheck and routed into the plan instead of taken as cash. It reduces Box 1 (federal taxable wages) dollar for dollar, which is why your Box 1 total often comes in lower than your Box 3 and Box 5 totals when you defer part of your pay: Social Security and Medicare tax still apply to the full amount before the deferral comes out, and only the federal (and typically state) income tax is postponed until you eventually take a distribution.

The annual §402(g) elective deferral limit caps what you personally can defer across all 401(k) and 403(b) plans combined in a calendar year — it's a per-person cap, not a per-employer or per-plan cap. Employees age 50 and older can defer more under the age-50 catch-up, and SECURE 2.0 layered in a larger catch-up for employees turning 60 through 63 that replaces the standard age-50 amount for that specific age band. A separate §415(c) limit caps total annual additions to the plan — your deferrals plus any employer match or other contributions combined — and sits well above the elective-deferral limit alone.

If you change jobs mid-year, or hold two 401(k)-eligible jobs at once, each employer's payroll system only tracks its own plan and has no visibility into what you deferred somewhere else. That means it's entirely possible to stay under each individual plan's limit while still exceeding your personal §402(g) cap once both W-2s are added together. Excess deferrals identified before the following April 15 can be pulled out as a corrective distribution; left uncorrected, the excess ends up taxed twice — once in the year you deferred it, again when it's eventually distributed.

Code D is strictly the traditional side of the plan. Roth 401(k) contributions — after-tax, already included in Box 1 — are reported separately under code AA, not code D. If your plan offers both and you split your contributions between them, you'll see both codes on the same W-2, and the two amounts share the same overall §402(g) limit even though they're taxed in opposite directions.

Tax return implications

  • Already subtracted from Box 1 — don't deduct code D again anywhere on Form 1040; the tax benefit is already built into your reported wages.
  • Still subject to Social Security and Medicare tax — Box 3 and Box 5 reflect your full pay before the 401(k) deferral, not after.
  • Counts toward the Retirement Savings Contributions Credit (Form 8880) if your AGI is under the phase-out for your filing status.
  • Doesn't touch Schedule B, Schedule D, or any income schedule — it isn't investment income until you eventually take a distribution from the plan.
  • If code D plus any other 401(k) or 403(b) elective deferrals you made at a different employer during the year exceed your personal §402(g) limit, the excess needs to be corrected before you file — no tax software catches a deferral split across two W-2s automatically.

Common pitfalls & things to check

  • Two employers in the same year each cap contributions at their own plan's limit — neither payroll system knows about the other job, so tracking your combined §402(g) total across all W-2s for the year is on you.
  • Roth 401(k) deferrals are code AA, not code D — if you elected Roth, traditional, or a mix of both, check that the code on your W-2 matches what you actually chose; payroll setup errors happen.
  • Employer matching and profit-sharing contributions are not reported anywhere on your W-2, including code D — they aren't your taxable compensation, so they only show up on your 401(k) plan statement, not your tax form. Some employers optionally list a match amount in Box 14, but nothing requires it.
  • 403(b) elective deferrals use code E, governmental 457(b) uses code G, and SIMPLE plans use code S — all four are close relatives, but code D specifically means a traditional 401(k).
  • A missed or late corrective distribution for an excess deferral results in the excess being taxed twice — once in the deferral year, again when it's eventually withdrawn.

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.

FAQ

What is code D on a W-2?

It's your traditional, pre-tax 401(k) elective deferral for the year — money you chose to route from your paycheck into your 401(k) instead of receiving as cash. It's already subtracted from Box 1, so you don't deduct it again on your return.

Does code D reduce my Social Security wages?

No. A 401(k) deferral reduces Box 1 (federal taxable wages) but not Box 3 or Box 5 — Social Security and Medicare tax apply to your pay before the 401(k) deferral is taken out.

What's the difference between code D and code AA?

Code D is traditional — pre-tax now, taxed when you eventually withdraw in retirement. Code AA is Roth — already taxed and already in Box 1, tax-free on qualified withdrawal. Both share the same annual elective deferral limit.

Does my employer's 401(k) match show up in code D?

No. Code D is your own elective deferral only. Employer matching and profit-sharing contributions aren't reported anywhere on the W-2 — check your 401(k) plan statement for those amounts instead.

Related W-2 boxes

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.

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.

Most searched navigate · open