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

The amount shown next to Code D in Box 12 of your W-2 is the total you contributed to a traditional, pre-tax 401(k) through payroll deductions during the year. Your employer has already subtracted it from the taxable wages in Box 1, so you don’t claim it again as a deduction on your return. You do want to check it against the annual contribution limit and, if your income is low enough, use it to claim the Saver’s Credit.

What the Code D Number Includes

Code D captures only the salary you elected to defer into a traditional 401(k), including a SIMPLE 401(k) if your employer uses one.1Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans It’s the money that came out of your paycheck by your choice, and nothing else.

Two things it does not include. Your employer’s matching contributions and any profit-sharing deposits are tracked separately and never appear under Code D.2Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3 Roth 401(k) contributions also don’t belong here; those go under Code AA.1Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans If you split your deferrals between pre-tax and Roth, you’ll see both lines, and you add them together to measure your total against the annual limit.

How It Affects the Rest of Your W-2

Your employer subtracts your Code D contributions from your gross pay before calculating the federal wages in Box 1. Earn $80,000, defer $10,000 into a traditional 401(k), and Box 1 will show around $70,000.2Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3 That’s the whole tax benefit of the contribution, and it flows through to your adjusted gross income.

The reduction stops at income tax. Boxes 3 and 5, your Social Security and Medicare wages, still include the full deferral. You pay FICA on every dollar you put into the plan.3Internal Revenue Service. Are Retirement Plan Contributions Subject to Withholding for FICA, Medicare, or Federal Income Tax

What to Do With Code D on Your Return

Enter the code and the dollar amount when your tax software prompts you for W-2 details. That’s it. Because the deferral has already been excluded from Box 1, you don’t take a separate deduction. The number is informational and lets the software run compliance checks against IRS records.2Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3 It won’t move your refund or balance due unless something is wrong.

The Saver’s Credit

Code D can put money back in your pocket through the Retirement Savings Contributions Credit, better known as the Saver’s Credit. If your AGI is low enough, you get a credit worth 10%, 20%, or 50% of your 401(k) contribution, up to $2,000 counted per person. That caps the credit at $1,000. For 2026, the 50% rate goes up to $48,500 AGI for joint filers, $36,375 for head of household, and $24,250 for single filers, with the 20% and 10% tiers phasing up to $80,500, $60,375, and $40,250 respectively.4Internal Revenue Service. 2026 Amounts Relating to Retirement Plans and IRAs, as Adjusted

You claim it on Form 8880. It’s nonrefundable, meaning it can zero out your tax but won’t create a refund by itself. Plenty of lower-income savers who contribute modest amounts skip it because they’ve never heard of it.

Checking Your Total Against the 2026 Limit

For 2026, the IRS caps 401(k) salary deferrals at $24,500.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 That ceiling covers the combined total of your Code D and any Code AA amounts.

If you turn 50 or older by December 31, 2026, you can add an $8,000 catch-up, bringing your personal limit to $32,500. A larger catch-up applies at ages 60, 61, 62, and 63: those workers can contribute an extra $11,250 above the base, for a maximum of $35,750. Once you’re 64, you return to the standard $8,000 catch-up.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500

A New Wrinkle for High Earners in 2026

Starting with tax years after December 31, 2025, if your prior-year Social Security wages (Box 3) exceeded $150,000, any catch-up contribution you make in 2026 must go in as Roth.6Internal Revenue Service. SECURE 2.0 Act Impacts How Businesses Complete Forms W-2 Those dollars will appear under Code AA rather than Code D on your 2026 W-2. Your base $24,500 can still be pre-tax. If your prior-year Social Security wages were $150,000 or below, you can still choose pre-tax or Roth for the catch-up if your plan offers both.

What to Do If You Contributed Too Much

Excess deferrals usually happen when someone changes jobs mid-year and contributes to two different 401(k) plans. Each payroll system only sees its own plan, so nothing flags the overlap.

To fix it, contact one of your plan administrators and request a corrective distribution of the excess plus its earnings. The deadline is April 15 of the year after you over-contributed. A filing extension on your tax return does not push this date.7Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

Pull the excess out in time, and you add that amount to your taxable income for the year you over-contributed and report the earnings in the year you receive them. Miss April 15, and the excess gets taxed twice: once in the year you contributed it, and again when you eventually withdraw it from the plan.7Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan Adding your Code D and Code AA amounts across every W-2 you receive each January prevents it.