Your 401(k) contributions on a W-2 live in Box 12: traditional pre-tax deferrals under Code D, and Roth deferrals under Code AA. The dollar amount beside each code is the total you deferred for the year, catch-up contributions included. Those same deferrals also change the wage figures in Boxes 1, 3, and 5, and the two account types change them differently.
Traditional vs. Roth: What Each Does to Your Wage Boxes
Your W-2 reports three separate wage figures. Box 1 is your federal taxable wages. Box 3 is your Social Security wages. Box 5 is your Medicare wages. A traditional 401(k) deferral lowers one of these. A Roth deferral lowers none.
A pre-tax contribution is subtracted from Box 1 before your wages are reported. Earn $80,000 and defer $10,000, and Box 1 shows $70,000. You don’t pay federal income tax on those dollars until you withdraw them in retirement.1Internal Revenue Service. Topic No. 424, 401(k) Plans
Boxes 3 and 5 still show the full $80,000. Pre-tax 401(k) deferrals don’t reduce Social Security or Medicare wages,1Internal Revenue Service. Topic No. 424, 401(k) Plans so you still owe the 6.2% Social Security tax (up to the 2026 wage base of $184,500) and the 1.45% Medicare tax on the contributed amount.2Internal Revenue Service. Topic No. 751, Social Security and Medicare Withholding Rates That’s why Box 1 is almost always smaller than Boxes 3 and 5 for anyone making pre-tax deferrals.
Roth 401(k) contributions behave differently on the front end. Because you’re saving with after-tax dollars, the deferral stays in Box 1. Boxes 3 and 5 also include the Roth amount, exactly as they would any other wages.3Internal Revenue Service. Retirement Plans FAQs on Designated Roth Accounts The payoff comes later, when qualified withdrawals come out tax-free.
So the quick read: a gap between Box 1 and Boxes 3/5 points to traditional deferrals. No gap points to Roth (or no deferrals at all). Split your contributions between the two during the year, and Box 1 lands somewhere in between.
Finding Your Deferral Amount in Box 12
Box 12 is where your employer itemizes specific types of pay and benefits with letter codes. Two codes matter for 401(k) participants:
- Code D is your traditional pre-tax elective deferrals to a 401(k) plan. The dollar amount is your total for the year, including any catch-up contributions.4Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3
- Code AA is your designated Roth contributions to a 401(k). Catch-ups are rolled into this figure too, not broken out separately.4Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3
Contributed to both buckets during the year? You’ll see both codes with separate dollar amounts on the same W-2. Box 12 has room for four coded entries; if your employer needs more than that, they’ll issue a second W-2 for the overflow.4Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3
You don’t report either amount separately on Form 1040. The IRS tracks the combined Code D plus Code AA total against the annual deferral limit, and the information flows through the W-2 itself.
2026 Limits to Check Your Totals Against
For 2026, you can defer up to $24,500 into a 401(k) through elective contributions. That ceiling applies to the combined total of traditional and Roth deferrals across every 401(k) plan you participated in during the year. Switch jobs, and both employers’ plans count against the same limit.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Older workers get more room:
- Age 50 and older: an additional $8,000 catch-up, for a total possible deferral of $32,500.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
- Ages 60 through 63: a higher catch-up of $11,250 instead of $8,000, for a maximum of $35,750. This “super catch-up” was created by the SECURE 2.0 Act and applies starting in 2025.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Catch-up contributions do not get their own code on the W-2. They’re combined with your regular deferrals under Code D or Code AA.4Internal Revenue Service. 2026 General Instructions for Forms W-2 and W-3 A 62-year-old who maxed out a traditional 401(k) would see $35,750 as a single number in Code D. For a breakdown of regular versus catch-up, check your pay stubs or plan statements.
If Code D and AA Together Exceed the Limit
Excess deferrals happen most often when someone contributes under two employers’ plans in the same year. If your combined Code D and Code AA figures run over your allowed limit, notify the plan administrator and request that the excess, plus earnings on it, be returned to you by April 15 of the following year.6Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan
Miss April 15 and the excess gets taxed twice: once in the contribution year and again when you eventually withdraw it. The corrective distribution shows up on a Form 1099-R for the year it’s paid out. Your original W-2 is not amended; it continues to reflect what you actually deferred. Catching the overage is on you.
Why You Won’t See the Employer Match
Your employer’s matching or profit-sharing contributions to your 401(k) do not appear anywhere on your W-2. They aren’t taxable to you when made, so they’re excluded from Boxes 1, 3, and 5, and no Box 12 code reports them. You’ll find them on your plan statement or annual benefits summary.
SECURE 2.0 gave employers the option to make matching contributions directly into the Roth side of your account. Even then, the match doesn’t land on the W-2. Roth employer matching contributions are reported on a Form 1099-R for the year they’re allocated, using code G in Box 7.7Internal Revenue Service. SECURE 2.0 Act Impacts How Businesses Complete Forms W-2 If your employer offers Roth matching, expect both a W-2 (for your own deferrals) and a 1099-R (for the match).
The Retirement Plan Checkbox in Box 13
Box 13 has a small checkbox labeled “Retirement plan.” Your employer checks it if you were an active participant in a workplace retirement plan at any point during the year. For 401(k) plans, that means you were credited with any contributions or forfeitures.8Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
The checkbox doesn’t change how your 401(k) itself is reported, but it controls whether you can deduct contributions to a separate traditional IRA. When the box is checked, income-based phase-outs may reduce or wipe out that deduction.5Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 A box checked when you never participated can cost you an IRA deduction you were entitled to. An unchecked box when you were an active participant can lead you to claim a deduction you don’t qualify for, which the IRS will eventually flag.
Checking Your W-2 and Fixing Mistakes
The simplest check is to compare the W-2 against your final pay stub of the year. Add up the year-to-date 401(k) deferrals from your pay stubs and match the total to Code D or Code AA. Then confirm Box 1 equals your gross wages minus pre-tax 401(k) deferrals, health insurance premiums, and any other pre-tax deductions. Boxes 3 and 5 should exceed Box 1 by roughly the amount of your pre-tax 401(k) contributions.
Common errors include the wrong Box 12 code (for example, 403(b) deferrals reported under Code D) and a missing Box 13 check when you were in fact an active participant.8Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans Another: pre-tax 401(k) deferrals mistakenly included in Box 1, which inflates taxable income and leads to overpaying federal tax.
If something doesn’t match, start with your employer’s payroll department. They can issue a Form W-2c, the corrected wage and tax statement, to fix the error.9Internal Revenue Service. Form W-2c (Rev. January 2026) Corrected Wage and Tax Statement If you’ve already filed, you’ll need to amend using Form 1040-X together with the W-2c once it arrives.