Code D in Box 12 of your W-2 is the total you chose to defer from your pay into a 401(k) plan, including a SIMPLE 401(k). Those deferrals aren't included in Box 1, your taxable wages, but they are included in Box 3 and Box 5, so Social Security and Medicare tax still apply to them.

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

The W-2 instructions tell employers to report elective deferrals in Box 3 (Social Security wages) even though the deferrals aren't included in Box 1. The same is true for Box 5 (Medicare wages). So if you deferred $10,000 into a 401(k), Box 1 is typically $10,000 lower than Box 5.

2026 401(k) limits

Limit20252026
Elective deferrals (401(k), 403(b), governmental 457, TSP)$23,500$24,500
Catch-up, age 50 and over (most plans)$7,500$8,000
Higher catch-up for ages 60 to 63$11,250$11,250

With the standard catch-up, a participant who is 50 or older can generally defer up to $32,500 in 2026. Employers report regular and catch-up deferrals as a single amount in Box 12 with code D.

What if code D is over the limit?

Your employer reports the full amount you deferred, even if it's over the limit. In the IRS example, an employee aged 45 defers $26,500 in 2026, so the W-2 shows D 26500.00 even though the limit is $24,500. The excess isn't included in Box 1, and when the plan returns the excess deferral with its earnings, that distribution is reported on Form 1099-R.

What code D doesn't include

  • Roth 401(k) contributions: reported with code AA.
  • Employer matching and nonelective contributions: not required on the W-2; some employers list them in Box 14a.
  • Voluntary after-tax (non-Roth) contributions: may appear in Box 14a, never in Box 12. See what goes in W-2 Box 14.
  • 403(b) deferrals use code E, and 457(b) deferrals use code G.

When code D is on your W-2, your employer should also check the “Retirement plan” box in Box 13. For every other Box 12 letter, see our full list of W-2 Box 12 codes.

Frequently asked questions

Is code D on my W-2 taxable?

Not for federal income tax in the year you defer it: it's excluded from Box 1. It is still subject to Social Security and Medicare tax, which is why it's included in Boxes 3 and 5.

Does code D include my employer's match?

No. Code D is your own elective deferrals. Employer matching contributions aren't required to be shown on the W-2.

What is the 401(k) limit for 2026?

$24,500 for elective deferrals, plus an $8,000 catch-up if you're 50 or older, or $11,250 if you're 60 to 63.

Do I enter code D on my tax return?

Enter it if your software asks for Box 12 items. Box 1 already excludes the deferrals, so you don't subtract them again.

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

Code D is pre-tax 401(k) deferrals. Code AA is designated Roth 401(k) contributions, which are included in Box 1.

This article is general information, not tax advice. Sources: 2026 General Instructions for Forms W-2 and W-3 (irs.gov/instructions/iw2w3), code D and Box 3; IRS news release IR-2025-111 (irs.gov/…/401k-limit-increases-to-24500-for-202…). Checked November 2026.