401(k) W-2 Box 12 Codes D and AA: Limits and Catch-Up Rules

On your W-2, the 401(k) Box 12 codes D and AA report how much you deferred into your employer’s 401(k) plan during the year. Code D is the pre-tax portion, Code AA is the Roth portion, and together they cannot exceed $24,500 for 2026 if you’re under 50.1Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 These codes are informational. Your employer already adjusted your taxable wages at the payroll level, so you don’t claim a separate deduction or pay extra tax because of what appears in Box 12. The codes exist so the IRS can verify you stayed within the deferral limit, and so you have a record of your Roth basis for later.

What Code D Reports

Code D shows the total you contributed to a traditional 401(k) on a pre-tax basis for the year, including any catch-up contributions if you’re 50 or older.2Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Regular deferrals and catch-up deferrals are combined into a single Code D figure. There is no separate code for the catch-up portion.

Because these dollars are pre-tax, they’ve already been subtracted from Box 1 (federal income tax wages). You don’t deduct them again on your return. One detail catches people off guard: Code D amounts are still included in Box 3 (Social Security wages) and Box 5 (Medicare wages).3Internal Revenue Service. Are Retirement Plan Contributions Subject to Withholding for FICA, Medicare, or Federal Income Tax Traditional 401(k) contributions cut your income tax now but do not reduce your Social Security or Medicare withholding.

Code D covers only your own contributions. Employer matching contributions don’t appear anywhere in Box 12.2Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Those are tracked by the plan and taxed when you take distributions in retirement.

What Code AA Reports

Code AA reports contributions you made to a designated Roth 401(k) account, again bundling regular and catch-up deferrals into one number.2Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Unlike Code D, this money is contributed after tax. The Code AA amount is included in Box 1, Box 3, and Box 5.4Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans You pay full income tax and payroll tax on these dollars now, and qualified distributions later in retirement come out tax-free.

Code AA also creates the official IRS record of your Roth basis, which is the running total of everything you’ve put in with after-tax dollars. Hang on to your W-2s or at least note these amounts each year. Proving basis decades from now is much easier if you have the paperwork.

If your employer offers Roth matching contributions under SECURE 2.0, those employer Roth matches are not reported under Code AA. They arrive later on a Form 1099-R from the plan.2Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes

The Combined Limit and Why Multiple Employers Matter

The IRS doesn’t care how you split contributions between traditional and Roth. It cares about the total. For 2026, Code D plus Code AA cannot exceed $24,500 for participants under 50.1Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 The limit applies across every 401(k) you contribute to during the year.

Change jobs mid-year, or hold two jobs at once, and each employer only sees its own plan. Nobody is watching the combined total but you. If you put $18,000 into one plan and $10,000 into another, your $28,000 exceeds the limit by $3,500. The IRS matches every W-2 filed under your Social Security number and will flag the excess if you don’t fix it first.

Catch-Up Rules That Change What Appears in D and AA

If you turn 50 or older at any point during 2026, you can defer an additional $8,000 on top of the $24,500 standard limit, for a total of $32,500.5Internal Revenue Service. Retirement Topics – 401(k) and Profit-Sharing Plan Contribution Limits Your plan has to permit catch-up contributions for you to use this extra room.6Internal Revenue Service. Issue Snapshot – 401(k) Plan Catch-Up Contribution Eligibility Catch-ups aren’t broken out separately on the W-2. They’re folded into Code D if pre-tax, or Code AA if Roth. A 55-year-old who defers $32,500 entirely pre-tax will simply see $32,500 in Code D.

The Higher Catch-Up for Ages 60 Through 63

SECURE 2.0 opened a narrow window with a larger catch-up. If you turn 60, 61, 62, or 63 at any point in 2026, your catch-up ceiling is $11,250 rather than $8,000, bringing the maximum total deferral to $35,750.1Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 At age 64 you revert to the standard $8,000 catch-up. Check your eligibility each year in this range because it’s easy to overlook.

Mandatory Roth Catch-Up for High Earners

Beginning January 1, 2026, a new SECURE 2.0 rule changes how higher earners make catch-up contributions. If your FICA wages from a single employer topped $150,000 in 2025, every catch-up dollar you contribute to that employer’s plan in 2026 must go into a Roth account.7Internal Revenue Service. Notice 2025-67, 2026 Amounts Relating to Retirement Plans and IRAs Pre-tax catch-ups are no longer an option. The $150,000 threshold is indexed for inflation and looks at prior-year wages, so your 2025 pay determines 2026 treatment.

If your employer’s plan doesn’t offer a Roth option, you won’t be able to make catch-up contributions at all under this rule. Ask HR before the year begins. Employees who earned under $150,000 in the prior year can still make catch-ups on either a pre-tax or Roth basis, if the plan allows both.

On your W-2, these mandatory Roth catch-ups show up inside the Code AA total, not under a separate code. The practical result for high earners is a larger Code AA and a smaller Code D than in prior years.

If You Went Over the Limit

Over-contributing is the real risk Box 12 is designed to surface, and it almost always happens to people who changed jobs or held two jobs during the year. If your combined deferrals across 401(k) plans exceed the limit, act quickly.

Contact one of the plan administrators and request a return of the excess. The plan has to distribute the excess plus any earnings by April 15 of the year following the over-contribution.8Internal Revenue Service. Retirement Topics – What Happens When an Employee Has Elective Deferrals in Excess of the Limits For a 2026 over-contribution, the deadline is April 15, 2027. Filing an extension does not extend this deadline.9Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

Correct it in time and the excess is taxable in the year you contributed it. The earnings on the excess are taxed in the year they’re distributed. There’s no 10% early distribution penalty on a timely correction.8Internal Revenue Service. Retirement Topics – What Happens When an Employee Has Elective Deferrals in Excess of the Limits

Miss April 15 and the excess gets taxed twice: once in the contribution year, and again when you eventually withdraw it.10Internal Revenue Service. Consequences to a Participant Who Makes Excess Annual Salary Deferrals Late corrections can also trigger the 10% early distribution penalty, mandatory 20% federal withholding, and spousal consent requirements.11Internal Revenue Service. 401(k) Plan Fix-It Guide – Elective Deferrals Weren’t Limited to the Amounts Under IRC Section 402(g) Double taxation plus penalties on the same dollars is one of the more expensive mistakes in retirement planning, and it’s fully avoidable by tracking contributions across employers.

When Box 12 Actually Affects Your Return

For most people with one employer all year, Codes D and AA require nothing at tax time. Your software reads the W-2, recognizes that Box 1 already reflects the Code D reduction, and produces the right result. Code AA flows through the same way because those wages were already taxed at payroll.

Situations where you do need to look at the numbers:

  • Multiple employers in the same year. Add every Code D and Code AA amount on every W-2 and compare the total to your applicable limit ($24,500 under 50, $32,500 at 50 or older, $35,750 at ages 60 through 63). If you’re over, request a corrective distribution before April 15.
  • You received a corrective distribution. Expect a Form 1099-R for the earnings portion. The excess deferral itself is reported as income for the year of the contribution.
  • The Saver’s Credit. Contributions reported in Box 12 may qualify you for the Retirement Savings Contributions Credit on Form 8880. For 2026, you can claim it if your adjusted gross income is below $40,250 (single), $60,375 (head of household), or $80,500 (married filing jointly). The credit is worth up to 50% of your first $2,000 of contributions depending on income, and it stacks on top of the tax benefit from pre-tax deferrals.1Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500

One boundary worth naming: if you also participate in a governmental 457(b) plan, those deferrals appear under a different Box 12 code and have their own separate annual limit. They don’t count against your 401(k) cap.12Internal Revenue Service. How Much Salary Can You Defer if You’re Eligible for More Than One Retirement Plan So a 457(b) contribution isn’t part of the Code D and Code AA total you’re checking against $24,500.