401(k) on W-2: Box 12 Codes, Employer Match, and Limits

Your 401(k) contributions show up on your W-2 in Box 12, marked with a letter code next to the dollar amount. They are not in Box 1 with your wages, and they are not listed as a separate deduction anywhere else on the form. The letter code tells you whether the money went in pre-tax or as Roth, and that single detail explains most of what else you will see on the form.

Where to Look on the Form

Box 12 sits in the lower-middle portion of the W-2. It has up to four slots labeled 12a, 12b, 12c, and 12d, and each slot pairs a letter code with a dollar amount. The dollar figure is the total you deferred from your paycheck during the calendar year. If you made both pre-tax and Roth contributions, or participated in more than one type of plan, you may see several codes stacked in those slots.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)

Box 1 at the top shows your federal taxable wages. For traditional 401(k) contributions, that money has already been taken out before Box 1 was calculated, so you will not find it there. That is why people often look at Box 1, see nothing resembling their contribution, and assume something is missing.

What the Letter Codes Mean

For a 401(k), two codes do most of the work:

If you work for a public school, hospital, or nonprofit, you may see Code E instead, which is used for 403(b) plan contributions. Government employees often see Code G for 457(b) deferrals. The tax treatment follows the same logic: pre-tax deferrals reduce Box 1, Roth deferrals do not.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)

Codes That Are Not Retirement Contributions

Box 12 is also used for things unrelated to retirement savings. Code DD, for instance, reports the total cost of your employer-sponsored health coverage. That number is purely informational and does not affect your taxes.3Internal Revenue Service. Reporting Employer-Provided Health Coverage on Form W-2 If the DD figure looks surprisingly large, that is because it includes what your employer paid for your health plan, not just your share.

Why Your Wage Boxes Do Not Match Each Other

Once you know whether you are looking at Code D or Code AA, the rest of the W-2 falls into place.

Pre-tax 401(k) deferrals are subtracted from your gross pay before federal income tax is calculated. If you earned $100,000 and contributed $10,000 pre-tax, Box 1 will show $90,000. That immediate reduction in taxable wages is the core benefit of a traditional 401(k).1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)

Those same contributions do not reduce your Social Security wages (Box 3) or Medicare wages (Box 5). Pre-tax 401(k) money is still subject to FICA taxes, so Boxes 3 and 5 will typically be higher than Box 1 for anyone contributing pre-tax.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) That gap is normal and correct. On a W-2 with $100,000 of gross pay and $10,000 going into a traditional 401(k), you should expect to see roughly $90,000 in Box 1 and $100,000 in Boxes 3 and 5.

Roth 401(k) contributions behave differently. If you earned $100,000 and put $10,000 into a Roth 401(k), Box 1, Box 3, and Box 5 all still show $100,000. You have already paid tax on that money. Code AA simply records that it went into the Roth side of the plan.

Where the Employer Match Is

It is not on the W-2. Box 12 only reflects what you personally deferred from your paycheck. Employer matching contributions are not taxable income to you when they go in, so they do not appear on a wage statement at all. To see your total plan balance including the match, check your 401(k) account statement or your plan provider’s online portal.

The Retirement Plan Checkbox

While you are looking at the lower half of the form, glance at Box 13. If the “Retirement plan” box is checked, it means you were covered by a workplace retirement plan during the year.4Internal Revenue Service. Are You Covered by an Employer’s Retirement Plan That check mark does not tell you how much you contributed, but it has a consequence worth knowing: it can limit or eliminate your ability to deduct contributions to a traditional IRA. If you are also funding an IRA, pay attention to it.

Checking the Number and Fixing Errors

Compare the Box 12 amount to your final pay stub for the year. The last stub should show year-to-date 401(k) deferrals, and that figure should match what the W-2 reports under Code D or Code AA. A dollar or two of rounding is normal; a bigger gap is not.

If the numbers do not line up, start with your employer’s payroll department. They can investigate and, if there is a mistake, issue a corrected W-2, called a W-2c. Do not file your return using numbers you know are wrong. If payroll will not help or does not respond, you can contact the IRS at 800-829-1040. Incorrect Box 12 codes are one of the most common W-2 errors the IRS sees in retirement plan audits.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans

Watch the Limit if You Changed Jobs

One trap your W-2 can quietly reveal: if you contributed to 401(k) plans at two different employers in the same year, each employer only tracks its own plan. Neither one knows what you deferred elsewhere. You are responsible for making sure your combined Code D and Code AA amounts across all W-2s stay within the annual limit, which is $24,500 for 2026 for employees under 50.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500

If you went over, you need to withdraw the excess and any earnings on it by April 15 of the following year. For a 2026 excess, that means April 15, 2027. Extending your tax return does not extend this deadline. To start the withdrawal, call the plan administrator at one of your employers.6Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

Miss that date and the excess gets taxed twice: once in the year you contributed it and again in the year it finally comes out of the plan. Late distributions can also trigger the 10% early withdrawal penalty and mandatory 20% withholding.7Internal Revenue Service. 401(k) Plan Fix-It Guide – Elective Deferrals Weren’t Limited to the Amounts Under IRC Section 402(g) Adding Code D amounts from each W-2 at tax time is the simplest way to catch this before it becomes expensive.

A Change Coming for Higher Earners

Starting in 2026, employees who earned more than $145,000 in FICA wages from their employer in the prior year and want to make catch-up contributions must designate those catch-ups as Roth. The catch-up portion will show up under Code AA rather than Code D, and it will remain in your taxable wages in Box 1.8Internal Revenue Service. Treasury, IRS Issue Final Regulations on New Roth Catch-Up Rule, Other SECURE 2.0 Act Provisions If you fit that income profile and are over 50, your W-2 may look different from last year’s for that reason.