W-2 Box 12 Codes Explained: Complete Guide

Direct answer: w-2 box 12 codes explained simply: Box 12 lists special pay and benefits with a letter code and a dollar amount. Each code tells you what the money is and whether it affects your tax return. The small labels 12a to 12d are just slots. The capital letter code is what matters.
Key Takeaways
- w-2 box 12 codes explained: a code plus a dollar amount, in slots 12a to 12d, for special pay and benefits.
- The slot letter (12a, 12b, 12c, 12d) is not part of the code. Only the capital letter code matters.
- Some codes lower Box 1, some are already in Box 1, and some are for information only.
- Never subtract a Box 12 amount on your return unless the instructions for that code tell you to.
- Use the table below to find your code, then open its full guide for the details.
w-2 box 12 codes explained: How Box 12 Works
Box 12 sits near the bottom of your W-2. It has four slots: 12a, 12b, 12c, and 12d. Each slot holds one code and one dollar amount. Your employer fills the slots in order. If you have more than four Box 12 entries, the extra entries go on a second W-2 from the same employer.
The small letters a, b, c, and d are just slot labels. They are not part of the code. A Code D entry means the same thing in 12a as it does in 12d. Do not enter the slot letter when you file. Enter only the capital letter code and its amount.
Box 12 is a catch-all. It covers retirement deferrals, health coverage costs, HSA money, taxable benefits, and more. That is why one box needs so many codes. The code tells the IRS, and tells you, what kind of money each amount is.
The Complete Table of Common Box 12 Codes
This table covers the codes most employees actually see. It is a hub, not a replacement for the single-code guides. Each linked code below has its own full guide on this site.
| Code | Meaning | Effect on your return |
|---|---|---|
| A | Uncollected Social Security or RRTA tax on tips | Tax you still owe on tips |
| B | Uncollected Medicare tax on tips | Tax you still owe on tips |
| C | Taxable cost of group-term life insurance over $50,000 | Already in Boxes 1, 3, and 5 |
| D | Elective deferrals to a 401(k), including SIMPLE 401(k) | Pre-tax; lowers Box 1 |
| E | Elective deferrals under a 403(b) salary reduction agreement | Pre-tax; lowers Box 1 |
| F | Elective deferrals under a salary reduction SEP | Pre-tax; lowers Box 1 |
| G | Elective deferrals and employer contributions to a 457(b) plan | Pre-tax; lowers Box 1 |
| W | Employer contributions, including cafeteria-plan amounts, to an HSA | Report on Form 8889 |
| AA | Designated Roth contributions under a 401(k) plan | After-tax; stays in Box 1 |
| BB | Designated Roth contributions under a 403(b) plan | After-tax; stays in Box 1 |
| DD | Cost of employer-sponsored health coverage | Information only; not taxable |
| EE | Designated Roth contributions under a governmental 457(b) plan | After-tax; stays in Box 1 |
| II | Medicaid waiver payments excluded from gross income under Notice 2014-7 | Excluded; stays out of Box 1 |
Retirement Codes: D, E, G, AA, BB, and EE
Retirement codes cause the most confusion, because the tax timing flips between pre-tax and Roth.
Pre-tax codes lower Box 1 now. You pay tax later, when you withdraw the money. IRS W-2 Box 12 Code D Meaning: 401(k) Elective Deferrals covers the private-sector 401(k). IRS W-2 Box 12 Code E Meaning: 403(b) Elective Deferrals covers the nonprofit and public-school 403(b). Code G covers the 457(b) plan used by governments and some nonprofits.
Roth codes do the opposite. The money stays in Box 1 now, because it went in after tax. Qualified withdrawals later are tax-free. IRS W-2 Box 12 Code AA Meaning: Roth 401(k) Contributions is the 401(k) Roth code. Code BB is the 403(b) Roth code. Code EE is the governmental 457(b) Roth code.
Each plan type has its own annual limit, and pre-tax and Roth deferrals to the same plan type share that limit. You cannot max out both separately. The IRS adjusts limits each year, so always check the limit for the year printed on your W-2. Do not use a limit from another year.
Health and Benefit Codes: DD, W, and C
Not every Box 12 code is about retirement. Three common codes are about health and benefits.
Code DD shows the total cost of your employer-sponsored health coverage. It is for information only. It is not taxable income, and it does not change your return. Read IRS W-2 Box 12 Code DD Meaning: Health Coverage Cost for the full explanation.
Code W shows employer contributions to your Health Savings Account, including money you put in through a cafeteria plan. Code W feeds Form 8889. It is already out of Boxes 1, 3, and 5. Read IRS W-2 Box 12 Code W Meaning: Employer HSA Contributions for the steps.
Code C shows the taxable cost of group-term life insurance over $50,000. This is imputed income. It is not cash you received. It is already included in Boxes 1, 3, and 5, so do not add it again.
The Code Most People Get Wrong: II
IRS W-2 Box 12 Code II Meaning: Medicaid Waiver Payments is the newest code many caregivers meet, and the most misread. Code II means Medicaid waiver payments excluded from gross income under Notice 2014-7. It is not a retirement code at all.
The mix-up is with Code EE. Code EE is the Roth 457(b) code. Code II is a care payment. If you swap them, you will treat tax-free care money as retirement money, or retirement money as care money. Both errors break your return.
Code II payments stay out of Box 1. You may still choose to count all of them as earned income for the Earned Income Credit or Additional Child Tax Credit, if they are otherwise earned income. That choice is all or nothing.
| Question to ask | If the answer is yes |
|---|---|
| Is the code pre-tax retirement (D, E, F, G)? | Box 1 should be lower by about that amount. Do not subtract it again. |
| Is the code Roth (AA, BB, EE)? | Box 1 still includes it. Qualified withdrawals later are tax-free. |
| Is the code DD? | It is information only. It does not change your tax. |
| Is the code II? | It is excluded care money, not retirement money. Check the credit choice. |
What To Do With Your Box 12 Entries
Follow these steps for every code on your W-2:
- Find each code in the table above. Note whether it lowers Box 1, stays in Box 1, or is information only.
- Open the full guide for that code. The table gives the short meaning. The guide gives the checks, the limits, and the traps.
- Match the amount to your pay stubs. Retirement deferrals should match your payroll deductions. Code W should match HSA contributions. Code C should match the imputed-income line on your final stub.
- Do not double-count. If an amount is already in Box 1, do not add it again. If Box 1 already excludes it, do not subtract it again.
- Check your wage transcript if anything looks off. Pull it through the IRS Get Transcript tool and compare the wage figures to your W-2.
- Ask payroll first for a wrong amount. A corrected W-2 (W-2c) fixes the record at the source. Do not just change the number on your return.
Your W-2 Box 2 federal withholding is a separate figure from every Box 12 code.
When to Ask for Help
Contact your employer or plan administrator when a Box 12 amount does not match your pay stubs, when a code is missing, or when you receive a W-2c and a code changes.
Talk to a tax professional when you have codes from more than one employer in the same year, when a retirement limit may be exceeded across employers, or when you need to decide the Code II earned-income choice for credits.
The official code list is in the IRS General Instructions for Forms W-2 and W-3.
Related Guides
- IRS Transcript Codes: Complete List and Meanings
- IRS W-2 Box 12 Code C Meaning: Taxable Group-Term Life Insurance
- IRS Form 1099-R Distribution Code 7 Meaning: Normal Distribution
- Tax Refund Status
FAQ
What does w-2 box 12 codes explained mean in plain English?
It means a plain-English list of what each Box 12 letter code stands for, what dollar amount goes with it, and whether that amount changes your tax return.
What do 12a, 12b, 12c, and 12d mean?
They are just slot labels. They are not part of the code. A code means the same thing in any slot. Enter only the capital letter code when you file.
Which Box 12 codes lower my taxable income?
Pre-tax retirement codes lower Box 1: D for 401(k), E for 403(b), F for a salary reduction SEP, and G for 457(b). Roth codes AA, BB, and EE do not lower Box 1.
Does Code DD mean I owe tax on my health coverage?
No. Code DD is the cost of employer-sponsored health coverage, shown for information only. It is not taxable income.
What is the difference between Code II and Code EE?
Code II is Medicaid waiver payments excluded from gross income under Notice 2014-7. Code EE is designated Roth contributions under a governmental 457(b) plan. They are unrelated codes that look alike.
Do I need to report every Box 12 code on my tax return?
Not as a separate line in every case. Many codes are already reflected in Box 1 or are information only. Follow the full guide for your specific code, and enter the code and amount where your tax software asks for W-2 Box 12 data.
Disclaimer: This post is general information only and is not tax advice. Every tax situation is different. For advice about your own W-2, consult a qualified tax professional or contact the IRS directly.