Quick Answer
Code D shows 401(k) pre-tax contributions, Code E shows 403(b) contributions, and Code G shows 457(b) plan contributions. These reduce your taxable income — for 2026, you can contribute up to $23,500 to these plans ($31,000 if 50+, $34,750 if 60-63). These amounts should already be excluded from your W-2 wages.
Best Answer
Diana Flores, EA
Employees with employer-sponsored retirement plans who want to maximize tax benefits
What codes D, E, and G mean on your W-2
These codes in Box 12 of your W-2 represent pre-tax contributions to different types of employer-sponsored retirement plans:
Important: These amounts should already be excluded from your taxable wages in Box 1 of your W-2.
Example: How these codes affect your taxes
Let's say Maria earns $80,000 and contributes to her employer's retirement plan:
The $12,000 appears as Code D in Box 12, but more importantly, it's already subtracted from her Box 1 wages, reducing her taxable income.
2026 contribution limits and tax benefits
*Tax benefit calculated for maximum contribution at 22-35% marginal tax rates
Key differences between these retirement codes
Code D (401(k) plans):
Code E (403(b) plans):
Code G (457(b) plans):
What you need to verify on your tax return
Check your contribution limits: Make sure your total contributions don't exceed IRS limits. If they do, you'll need to withdraw the excess to avoid double taxation.
Verify Box 1 wages: Your taxable wages should equal gross wages minus pre-tax deductions (including retirement contributions). If Box 1 seems too high, your employer may have made an error.
Roth vs. pre-tax: Some plans allow Roth contributions, which appear differently on your W-2. Roth contributions are included in Box 1 wages but marked separately.
Common tax mistakes with retirement contribution codes
Mistake 1: Trying to deduct these amounts again on your tax return. They're already excluded from your taxable wages.
Mistake 2: Not contributing enough to get full employer match. This is "free money" — maximize it first.
Mistake 3: Exceeding contribution limits across multiple jobs. If you change jobs mid-year, track your total contributions.
What you should do
1. Verify the amounts shown in codes D, E, or G match your records
2. Check contribution limits — make sure you haven't exceeded the $23,500 basic limit (or higher limits if you qualify)
3. Plan for next year — consider increasing contributions if you're not maxing out
4. Maximize employer matching if your company offers it
Use our refund estimator to see how increasing your retirement contributions could affect your tax refund and take-home pay for next year.
Special considerations for 2026
The new "super catch-up" provision allows employees ages 60-63 to contribute an additional $11,250 beyond the regular catch-up amount. If you're in this age range, your maximum 401(k) or 403(b) contribution is $34,750.
Key takeaway: Codes D, E, and G show retirement contributions that already reduced your taxable wages by up to $23,500 ($34,750 if 60-63), potentially saving you $5,170-$8,245 in taxes depending on your bracket.
*Sources: [IRS Publication 560](https://www.irs.gov/pub/irs-pdf/p560.pdf), [Form W-2 Instructions](https://www.irs.gov/pub/irs-pdf/iw2w3.pdf)*
Key Takeaway: Codes D, E, and G represent pre-tax retirement contributions that already reduced your taxable wages, potentially saving thousands in taxes without any additional action needed on your return.
2026 retirement plan contribution limits and tax benefits
| Plan Type (Code) | Basic Limit | Age 50+ Limit | Age 60-63 Limit | Tax Savings Range* |
|---|---|---|---|---|
| 401(k) - Code D | $23,500 | $31,000 | $34,750 | $5,170 - $8,245 |
| 403(b) - Code E | $23,500 | $31,000 | $34,750 | $5,170 - $8,245 |
| 457(b) - Code G | $23,500 | $31,000 | N/A | $5,170 - $8,245 |
More Perspectives
Diana Flores, EA
Employees who are new to retirement contributions or want a basic understanding
Simple explanation of retirement contribution codes
If you see Code D, E, or G in Box 12 of your W-2, it means you contributed money to a retirement plan through your employer. The good news? You've already received the tax benefit.
What this means for your taxes
These contributions were taken from your paycheck before taxes were calculated. So if you earned $50,000 but contributed $6,000 to your 401(k), your taxable income is only $44,000.
Example:
Do you need to do anything?
Usually, no. The tax software will automatically use the wages shown in Box 1, which already reflect your retirement contributions. You don't need to enter these codes separately.
When to pay attention
Only worry about these codes if:
Key takeaway: These codes show money you already saved on taxes by contributing to retirement — no additional action needed when filing your return.
Key Takeaway: Retirement contribution codes show tax savings you already received through payroll, with no additional action needed when filing your return.
Sources
- IRS Publication 560 — Retirement Plans for Small Business
- Form W-2 Instructions — Instructions for Forms W-2 and W-3
Related Questions
Reviewed by Diana Flores, EA on February 28, 2026
This content is for educational purposes only and is not a substitute for professional tax advice. Consult a qualified tax professional for advice specific to your situation.