Boxes 12a and 12b on a W-2 are simply the first two of four reporting slots (12a, 12b, 12c, and 12d) where your employer lists specific compensation and benefit items that need to be broken out from your regular wages. The lowercase letters are just line labels showing position on the form. What actually matters is the letter code your employer puts inside the slot, next to the dollar amount, because that code tells you what kind of item is being reported and how, if at all, it affects your tax return.
How a Box 12 Entry Is Built
Each of the four slots has two parts: a one- or two-letter code on the left of a small vertical line, and a dollar amount on the right. Employers fill the slots in order, so 12a gets used first, then 12b, and so on. If you have more than four coded items to report, your employer will issue a second W-2 carrying only the overflow entries, with the same identifying information at the top.
The slot label carries no meaning. An amount in 12a on one person’s W-2 might be a 401(k) deferral; the same 12a slot on someone else’s W-2 might be the cost of their employer-sponsored health coverage. The code is what identifies the item.
What Box 12 Reports
Box 1 shows your total taxable wages. Box 12 exists to separately identify amounts that either were already excluded from Box 1, were already included in it but need their own line, or are reported purely for your information. The IRS uses these entries to monitor annual contribution limits on tax-advantaged accounts and to track how fringe benefits are handled.
Not every W-2 will have Box 12 entries, and many workers will only see one or two. Below are the codes you’re most likely to run into.
Pre-Tax Retirement Deferrals
These codes report money you chose to have withheld from your paycheck before income tax was calculated. The amount has already been subtracted from your Box 1 wages, so nothing extra needs to happen on your Form 1040. The Box 12 entry lets the IRS verify you stayed within the annual limit.
- Code D: pre-tax contributions to a traditional 401(k).
- Code E: pre-tax contributions to a 403(b), typically offered by public schools and tax-exempt organizations.
- Code G: elective deferrals to a 457(b) deferred compensation plan, common among state and local government employees.
- Code S: salary reduction contributions to a SIMPLE IRA, a small-business retirement plan.
For reference, the 2026 elective deferral limit for 401(k), 403(b), and 457(b) plans is $24,500, and the SIMPLE IRA limit is $17,000. Catch-up contributions raise the ceiling for participants aged 50 and over, and a higher catch-up applies to those aged 60 through 63 in 401(k) and 403(b) plans.1Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Roth Contributions
If your plan has a Roth option and you used it, your after-tax contributions show up under separate codes. Unlike the pre-tax codes, Roth amounts are already included in your Box 1 wages, because you’re paying tax now in exchange for tax-free withdrawals later.
- Code AA: designated Roth contributions to a 401(k).2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
- Code BB: designated Roth contributions to a 403(b).2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
- Code EE: designated Roth contributions to a governmental 457(b).2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
Practically speaking, whether you see Code D or Code AA for the same 401(k), the number on your return doesn’t change. The distinction just tells you whether the money has already been taxed.
Code W: HSA Contributions
Code W reports total contributions to your Health Savings Account for the year, combining what your employer put in and any pre-tax payroll contributions you made through a cafeteria plan. The amount is excluded from federal income tax, Social Security tax, and Medicare tax.3Internal Revenue Service. General Instructions for Forms W-2 and W-3
Code W is the one Box 12 entry that requires you to do something beyond typing a number into your tax software. You have to complete Form 8889 and attach it to your return; that form reconciles your contributions against the annual limit and calculates any additional deduction for amounts you contributed outside of payroll.4Internal Revenue Service. Instructions for Form 8889 The 2026 HSA limits are $4,400 for self-only coverage and $8,750 for family coverage under a high-deductible health plan, with an extra $1,000 catch-up allowed if you’re 55 or older.5Internal Revenue Service. Revenue Procedure 2025-19
Code C: Group-Term Life Insurance Over $50,000
If your employer provides group-term life insurance with coverage above $50,000, the taxable cost of the excess coverage appears here. Your employer has already included this amount in your wages in Boxes 1, 3, and 5, so you don’t add it again. The Box 12 line is there so you can see how much of your reported wages came from this non-cash benefit.3Internal Revenue Service. General Instructions for Forms W-2 and W-3
Code DD: Employer-Sponsored Health Coverage
Code DD shows the total cost of your employer-sponsored health insurance, combining the employer’s share and yours. This reporting was mandated by the Affordable Care Act and is purely informational. The amount is not taxable, not deductible, and changes nothing on your return.6Internal Revenue Service. Form W-2 Reporting of Employer-Sponsored Health Coverage
What Each Code Does to Your Return
It helps to sort the codes into three practical buckets:
- Already excluded from Box 1, no action needed. Codes D, E, G, and S. The tax benefit is baked in.7Internal Revenue Service. Topic No. 424, 401(k) Plans
- Already included in Box 1, no action needed. Code C and the Roth codes AA, BB, and EE. The entry just breaks out the amount for your records.
- Purely informational. Code DD.
Code W stands apart because of the required Form 8889 attachment. Everything else is either informational or already reflected in your wage figures.
The Box 13 Retirement Plan Checkbox
Something worth checking whenever Box 12 contains a retirement code: when your entry shows D, E, S, AA, or BB, your employer is also required to check the “Retirement plan” box in Box 13.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans That small checkbox tells the IRS you’re an active participant in a workplace retirement plan, which can limit or eliminate your ability to deduct contributions to a traditional IRA depending on your income and filing status. If Box 13 is checked, look at the IRA deduction phaseout ranges for the year before assuming a full deduction is available.
One exception: if your only workplace plan is a 457(b), the employer should not check the Box 13 retirement plan box, and the IRA deduction phaseout doesn’t apply on that basis alone.2Internal Revenue Service. Common Errors on Form W-2 Codes for Retirement Plans
If Something in Box 12 Looks Wrong
Employers occasionally use the wrong code, report the wrong amount, or leave Box 12 blank when it should have entries. Start with your employer’s payroll department and ask for a corrected W-2, which is Form W-2c. Most errors get resolved that way.
If you still don’t have a corrected form by the end of February, call the IRS at 800-829-1040. The IRS will send your employer a letter requesting a corrected W-2 within ten days and will also send you Form 4852, a substitute W-2 you can use to file if the corrected version doesn’t arrive in time.8Internal Revenue Service. W-2 – Additional, Incorrect, Lost, Non-Receipt, Omitted Base your estimates on your final pay stub for the year. If a corrected W-2 later arrives with different figures than what you reported on Form 4852, file an amended return on Form 1040-X.