What Does W-2 Box 12 Code D Mean for Your Taxes?

The amount reported in W-2 Box 12 with Code D is the total pre-tax salary you deferred into a traditional 401(k) through payroll during the year. Your employer already subtracted that figure from the wages in Box 1, so you don’t deduct it again on your return. The number is there mainly so you (and the IRS) can confirm you stayed under the annual contribution limit and can claim any retirement-related credits you qualify for.1Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3

What the Code D Number Includes

Code D captures only the money you elected to divert from your own paycheck into a pre-tax 401(k).2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans Two things it does not include, and both trip people up:

  • Employer matching contributions and profit-sharing deposits. Those are tracked separately and never show up in Box 12 under Code D.1Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3
  • Roth 401(k) contributions. Designated Roth deferrals appear under Code AA instead. Both pre-tax and Roth deferrals count against the same annual limit, so if you split your contributions, add Code D and Code AA together when checking whether you hit the cap.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans

How It Changed Your Box 1 Wages

Pre-tax 401(k) deferrals reduce your federal (and usually state) taxable wages. If you earned $80,000 and deferred $10,000, Box 1 shows roughly $70,000.1Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3 That’s the tax benefit already priced in.

What the deferral doesn’t do is cut your Social Security and Medicare wages. Boxes 3 and 5 still include every dollar you contributed, and you paid FICA on all of it.3Internal Revenue Service. Are Retirement Plan Contributions Subject to Withholding for FICA, Medicare, or Federal Income Tax So Box 1 will be lower than Boxes 3 and 5 by roughly the Code D amount, and that’s normal.

Entering Code D on Your Tax Return

You don’t take a separate deduction for the Code D amount. The reduction has already happened inside Box 1. When you type your W-2 into tax software, you enter the code and dollar figure exactly as printed, and the software uses it to run compliance checks against the contribution limit. It won’t change your refund unless something is wrong.1Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3

Checking It Against the 2026 Contribution Limit

For 2026, the standard employee deferral limit is $24,500, up from $23,500 in 2025.4Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 That ceiling covers your combined Code D and Code AA totals.

If you turn 50 or older by December 31, 2026, you can add an $8,000 catch-up on top, for a personal ceiling of $32,500. Workers who are 60, 61, 62, or 63 during the year get a larger SECURE 2.0 catch-up of $11,250, pushing their maximum to $35,750. At 64 and above, the catch-up drops back to $8,000.4Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500

The check that matters most: if you worked for more than one employer during the year, add up Code D (plus Code AA) across every W-2. The limit is yours, not the plan’s, and neither payroll system knows what the other one did.

What to Do If You Went Over the Limit

Contributing more than the annual limit creates an excess deferral. To fix it, contact one of your plan administrators and request a corrective distribution of the excess amount plus any earnings it generated. The deadline is hard: April 15 of the year after you over-contributed, and filing an extension on your tax return does not extend it.5Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

If you pull the excess out by April 15, you add that amount to your taxable income for the year of the over-contribution (since it should never have been excluded from wages), and you report the earnings as income in the year you actually receive the distribution. The plan will issue a Form 1099-R.

Miss the April 15 deadline and the excess gets taxed twice: once in the year you contributed it, and again when you eventually withdraw it in retirement.5Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

Where Code D Can Actually Cut Your Tax: The Saver’s Credit

The Retirement Savings Contributions Credit (the Saver’s Credit) is one place your Code D number does more than sit on the form. If your adjusted gross income falls under certain thresholds, you can claim a credit worth 10%, 20%, or 50% of your 401(k) contributions, on up to $2,000 of contributions per person, for a maximum credit of $1,000. For 2026:6Internal Revenue Service. 2026 Amounts Relating to Retirement Plans and IRAs, as Adjusted

  • 50% credit rate: AGI up to $48,500 (married filing jointly), $36,375 (head of household), or $24,250 (single and other filers)
  • 20% credit rate: AGI up to $52,500 (married filing jointly), $39,375 (head of household), or $26,250 (single and other filers)
  • 10% credit rate: AGI up to $80,500 (married filing jointly), $60,375 (head of household), or $40,250 (single and other filers)

You claim it on Form 8880, filed with your return. The credit is nonrefundable, so it can zero out what you owe but won’t create a refund on its own. Lower-income workers who put even a modest amount into a 401(k) routinely miss it because they don’t know to file the form.