The deferred compensation entries on your W-2 live in Box 12, where a one- or two-letter code identifies the type of plan and the dollar figure next to it shows how much you deferred during the year. The code tells you whether the amount was pre-tax, Roth, a SIMPLE contribution, or a non-qualified deferral, and that classification controls whether the money was pulled out of your Box 1 federal taxable wages or left in. Reading the Box 12 codes correctly is how you confirm your employer applied the right tax treatment and how you spot problems before they turn into penalties.
What Box 12 Does to Boxes 1, 3, and 5
Box 1 is your federal taxable wages. Box 3 is your Social Security wages, and Box 5 is your Medicare wages. A Box 12 deferral entry affects these three boxes differently depending on the code.
For traditional pre-tax contributions to a qualified plan, your employer subtracts the deferred amount from Box 1 but leaves it in Boxes 3 and 5. Earn $100,000 and defer $20,000 into a traditional 401(k), and Box 1 shows $80,000 while Boxes 3 and 5 still show $100,000 (up to the Social Security wage base). The IRS requires elective deferrals under codes D, E, F, G, and S to stay in Social Security and Medicare wages.1Internal Revenue Service. General Instructions for Forms W-2 and W-3 – Specific Instructions for Form W-2 If you see Box 3 and Box 5 higher than Box 1, a pre-tax retirement deferral is usually why.
Roth contributions sit in Box 12 too, but they don’t change Box 1 because you paid income tax on the money before it went in. Non-qualified deferrals under Section 409A move Box 1 but, at the vesting event, move Boxes 3 and 5 instead. The code tells you which rule applies.
Codes for Pre-Tax Qualified Plans
Four codes cover the retirement plans most employees will see on a W-2. Each shows the amount of your own elective deferral for the year, and each reduces Box 1 while leaving Boxes 3 and 5 untouched.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
- Code D is for elective deferrals to a 401(k) plan, including SIMPLE 401(k) arrangements. This is the most common code on American W-2s.
- Code E is for elective deferrals to a 403(b) plan, used by public schools and certain tax-exempt organizations.
- Code G is for deferrals and employer contributions to a governmental 457(b) plan. Code G is unusual in that it combines your own elective deferrals with any employer nonelective contributions in a single figure.
- Code S is for employee salary reduction contributions to a SIMPLE IRA under Section 408(p), including contributions made to a Roth SIMPLE IRA.
You may also see Code F on an older W-2. It covers salary reduction contributions under a grandfathered SARSEP arrangement that an employer established before 1997.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
A W-2 can show up to four Box 12 entries, labeled 12a through 12d, and the labels have no significance beyond stacking the codes in order. The code letter is what matters.
SEP-IRAs Don’t Show Up Here
If your employer funds a SEP-IRA for you, do not expect to find it on your W-2. Employer SEP contributions are deducted on the employer’s tax return and reported to you on Form 5498, not through any Box 12 code.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
Codes for Roth Contributions
Designated Roth contributions carry their own set of codes so the IRS can track how much went into the Roth bucket, even though the money is already in Box 1.
- Code AA is for designated Roth contributions under a 401(k) plan.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
- Code BB is for designated Roth contributions under a 403(b) plan.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
- Code EE is for designated Roth contributions under a governmental 457(b) plan.3Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)
Roth contribution amounts are included in Boxes 1, 3, and 5, because the money is subject to income tax and FICA tax in the year you earn it.3Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026) The tradeoff comes later: qualified distributions from a designated Roth account, taken after a five-year holding period and after you reach age 59½, become disabled, or die, are generally tax-free.4Internal Revenue Service. Retirement Plans FAQs on Designated Roth Accounts
Codes for Non-Qualified Deferred Compensation
Non-qualified deferred compensation plans are contractual arrangements, typically offered to executives and other highly compensated employees, governed by Section 409A of the Internal Revenue Code.5Office of the Law Revision Counsel. 26 USC 409A – Inclusion in Gross Income of Deferred Compensation Under Nonqualified Deferred Compensation Plans Two Box 12 codes track them.
Code Y
Code Y reports the amount you elected to defer under a Section 409A non-qualified plan during the tax year. It is excluded from Box 1, which reflects the income tax deferral, and sits in Box 12 as an informational entry so the IRS can follow the money.3Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)
FICA on these plans doesn’t wait for payout. Under the special timing rule of Section 3121(v)(2), Social Security and Medicare taxes are owed on deferred compensation at the later of when you perform the services or when the compensation stops being subject to a substantial risk of forfeiture. In practice, that usually means FICA hits at vesting, and the vested amount shows up in Boxes 3 and 5 even though Box 1 is unaffected. That is why Box 3 and Box 5 can tower over Box 1 in a year when a large non-qualified balance vests.
Code Z
Code Z is the one you don’t want to see. It means compensation previously deferred under a non-qualified plan has failed to satisfy Section 409A and must now be included in your taxable income. The Code Z amount is also added to Box 1. On top of regular income tax, you owe an additional 20% tax on the amount plus an interest charge calculated from the year the compensation was first deferred.6Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)26 USC 409A – Inclusion in Gross Income of Deferred Compensation Under Nonqualified Deferred Compensation Plans If Code Z appears, talk to a tax professional before you file.
2026 Deferral Limits
The dollar figure next to a Box 12 code should not exceed the annual elective deferral limit for that plan type. For 2026, the elective deferral limit for 401(k), 403(b), and governmental 457(b) plans is $24,500, and it applies to your traditional and Roth contributions combined.7Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Catch-up contributions add to those ceilings. Employees age 50 or older can defer an additional $8,000, for a total of $32,500. Employees aged 60 through 63 get a higher SECURE 2.0 catch-up of $11,250, for a combined maximum of $35,750.7Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Starting in 2026, SECURE 2.0 also changes catch-up contributions for higher earners. If you earned more than $150,000 in FICA wages from your employer in the prior year, all of your catch-up contributions must go into a designated Roth account. You can still make them, but only as after-tax Roth deferrals. Employees earning $150,000 or less keep the choice between pre-tax and Roth catch-up contributions. On your W-2, that means a high earner’s catch-up portion should land under Code AA, BB, or EE rather than D, E, or G.
If the Box 12 Amount Exceeds the Limit
Add up your Code D, E, G, S, AA, BB, and EE amounts across every W-2 you received, and compare the total to the limit for your age. If you went over, usually because you participated in two employers’ plans during the same year, you need the excess corrected.
The deadline is April 15 of the year following the year of deferral. If the excess plus any earnings is distributed back to you by that date, the excess is taxable in the year you originally deferred it and the earnings are taxable in the year distributed, but you avoid being taxed on the same money twice.8Internal Revenue Service. 401(k) Plan Fix-It Guide – Elective Deferrals Werent Limited to the Amounts Under IRC Section 402(g) for the Calendar Year and Excesses Werent Distributed If you have two employers and exceeded the combined limit, you need to notify at least one plan administrator before March 1 of the following year so the correction can be processed in time. The administrator will not know you went over the limit at another job.
Miss April 15 and the excess is taxed twice: once in the year of deferral and again when it eventually comes out of the plan. The corrective distribution also becomes subject to the 10% early distribution penalty if you’re under 59½. When a timely correction is made, the plan administrator reports the returned amount on Form 1099-R using distribution Code 8 or Code P in Box 7.9Internal Revenue Service. 2025 Instructions for Forms 1099-R and 5498