401(k) W-2 Box 12 Codes D and AA: Limits, Catch-Ups, and Filing

On your W-2, Box 12 Codes D and AA report your 401(k) elective deferrals for the year: Code D is the total you contributed on a pre-tax basis, and Code AA is the total you contributed to a designated Roth 401(k) account.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes For 2026, the two amounts together cannot exceed $24,500 if you’re under 50.2Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 Neither code changes what you owe on your return directly. Your employer already adjusted your taxable wages at the payroll level, so the codes exist mainly as an audit trail that lets the IRS verify you stayed within the limit and gives you a record of your retirement basis.

What Code D Reports

Code D is the total you deferred into a traditional 401(k) on a pre-tax basis during the year, catch-up contributions included.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Your employer rolls regular deferrals and catch-up deferrals into a single Code D figure. There is no separate code for the catch-up piece.

Because the money went in pre-tax, it’s already been carved out of Box 1 (federal income tax wages). You don’t claim an additional deduction on your return. One detail catches people off guard: Code D amounts are excluded from Box 1 but stay 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 Pre-tax 401(k) deferrals cut your income tax now; they don’t cut Social Security or Medicare withholding.

Code D shows employee contributions only. Employer matching contributions never appear in Box 12.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Those live on the plan’s own records and don’t touch your tax return until you take distributions.

What Code AA Reports

Code AA is the total you contributed to a designated Roth 401(k) account, again bundling regular and catch-up deferrals into one number.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes Unlike Code D, this money was contributed after tax, so 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 Full income tax and payroll taxes have already been paid on those dollars.

The payoff comes later: qualified Roth 401(k) distributions in retirement are entirely tax-free, both contributions and earnings. Code AA is the official IRS record of your Roth basis, the running total of what you’ve put in with after-tax dollars. Hold onto your W-2s, or at least note the yearly Code AA figure, because you may need to prove that basis decades from now.

If your employer offers Roth matching contributions under SECURE 2.0, the employer Roth match is not reported in Box 12 under Code AA. It shows up on a Form 1099-R issued by the plan instead.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes

The Combined Limit Across Both Codes

The IRS doesn’t care how you split contributions between traditional and Roth. What matters is the total. For 2026, Code D plus Code AA cannot exceed $24,500 if you’re under 50.2Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 The cap applies across all employers combined.

That’s the trap in a job change or a year with two concurrent jobs. If you contributed $18,000 at one employer and $10,000 at another, your combined $28,000 blows past the limit by $3,500. Each employer only sees its own plan. Nobody is automatically watching the total but you. The IRS cross-references every W-2 filed under your Social Security number and will flag an excess if you haven’t fixed it first.

How Catch-Up Contributions Appear

If you turn 50 or older at any point during 2026, you can defer an additional $8,000 beyond the $24,500 base limit, for a total of $32,500, provided your plan permits catch-up contributions.5Internal Revenue Service. Retirement Topics – 401(k) and Profit-Sharing Plan Contribution Limits6Internal Revenue Service. Issue Snapshot – 401(k) Plan Catch-Up Contribution Eligibility Catch-up amounts don’t get a separate Box 12 code. They fold into Code D if pre-tax or Code AA if Roth.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) – Section: Box 12 Codes A 55-year-old who defers the full $32,500 pre-tax will simply see $32,500 in Code D.

Ages 60 Through 63

SECURE 2.0 created a higher catch-up limit for a narrow age window. If you turn 60, 61, 62, or 63 at any point during 2026, your catch-up ceiling rises from $8,000 to $11,250, bringing your maximum total deferral to $35,750.2Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 Once you turn 64, you drop back to the standard $8,000 catch-up. Check your eligibility each year inside this window; the extra room is easy to miss.

Mandatory Roth Catch-Up for High Earners

Starting January 1, 2026, a new SECURE 2.0 rule changes how high earners make catch-up contributions. If your FICA wages from a single employer exceeded $150,000 in 2025, every catch-up dollar you contribute to that employer’s plan in 2026 has to go into a Roth account.7Internal Revenue Service. Notice 2025-67, 2026 Amounts Relating to Retirement Plans and IRAs Pre-tax catch-up deferrals are no longer permitted for that group. The threshold is indexed for inflation and applies based on the prior year’s wages, so 2025 pay determines 2026 treatment.

If your plan doesn’t offer a Roth 401(k) option, you can’t make catch-up contributions at all under this rule. Confirm with HR before the year begins. Employees under the $150,000 prior-year threshold can still catch up on either a pre-tax or Roth basis, if the plan allows both.

On your W-2, mandatory Roth catch-ups will appear as part of the Code AA total, not under any separate code. In practice, high earners will see a larger Code AA and a smaller Code D than in prior years.

If Your Combined Deferrals Exceeded the Limit

Over-contributing is the risk Codes D and AA are designed to expose, and it usually hits people who switched employers or held two jobs in the same year. If your total deferrals across all 401(k)-type plans exceed the limit, act quickly.

Contact one of your plan administrators and request a return of the excess. The plan must distribute the excess plus any earnings on it by April 15 of the year after 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, that deadline is April 15, 2027, and extending your tax return does not extend it.9Internal Revenue Service. Consequences to a Participant Who Makes Excess Deferrals to a 401(k) Plan

If you correct on time, the excess deferral is taxable income for the year you contributed it, and the earnings on the excess are taxed in the year they’re distributed. The 10% early distribution penalty does not apply to a timely correction.8Internal Revenue Service. Retirement Topics – What Happens When an Employee Has Elective Deferrals in Excess of the Limits

Miss the April 15 deadline and the excess gets taxed twice: once in the year you contributed it and again when you eventually take it out of the plan.10Internal Revenue Service. Consequences to a Participant Who Makes Excess Annual Salary Deferrals Late corrections may 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 tax plus penalties on the same dollars is entirely avoidable if you track your combined contributions during any year you have more than one employer.

How Codes D and AA Flow Onto Your Return

For a single-employer filer, Codes D and AA usually require no action at tax time. Tax software reads the W-2, recognizes that Box 1 already reflects the pre-tax reduction from Code D, and populates your return correctly. Code AA flows through without any manual adjustment because those wages were already fully taxed at payroll.

Pay attention in two situations. First, if you had multiple employers, add up every Code D and Code AA amount across all W-2s and compare the total to your applicable limit: $24,500 under 50, $32,500 at 50 or older, or $35,750 at ages 60 through 63. If the sum exceeds the limit, request a return of excess before April 15. Second, if you already received a corrective distribution, you’ll get a Form 1099-R for the earnings portion, and the excess deferral itself must be included as income for the year it was contributed.

Codes D and AA are ultimately an audit trail. The IRS matches every entry filed under your Social Security number against the statutory limits, so it pays to do the math yourself first.