
Box 12 on a W-2 reports amounts that need their own label, each as a one or two letter code and an amount. Code D is your traditional 401(k) contributions, code DD is what your health coverage cost, and code W is money paid into your health savings account. Most of them are not extra income.
In brief: the code tells you what the amount is, and the slot it sits in (12a to 12d) means nothing. Some codes are already counted in box 1 wages, some are left out on purpose, and some, like DD, are information only. For 2026 the IRS added three codes: TA, TP and TT.
What is box 12 on a W-2?
Box 12 has four slots, 12a to 12d. Each holds a code left of the line and an amount right of it, such as D 5300.00. The slot letter has nothing to do with the code: a 401(k) amount in box 12a is code D, not code A (IRS W-2 instructions).
The copy an employer files with the Social Security Administration holds no more than four box 12 items. When an employee has more, the employer files a second W-2 for the extra items. Employee copies printed on an approved substitute form can list more than four.
The most common box 12 codes and what they mean for your taxes
What matters for your return is whether the amount is already inside box 1 (income tax wages) and boxes 3 and 5 (Social Security and Medicare wages). Here is how the IRS instructions treat the codes most people see:
| Code | What it is | In box 1? | In boxes 3 and 5? |
|---|---|---|---|
| D | Traditional 401(k) contributions | No, left out | Yes |
| E, G, S | 403(b), 457(b) and SIMPLE plan contributions | No, left out | Yes |
| AA, BB, EE | Roth 401(k), Roth 403(b) and Roth 457(b) contributions | Yes | Yes |
| W | Employer HSA contributions, including yours through a cafeteria plan | No, if excludable | No, if excludable |
| DD | Cost of employer-sponsored health coverage | No, information only | No |
| C | Taxable cost of group-term life insurance over the excluded amount | Yes | Yes |
| V | Income from exercising nonstatutory stock options | Yes | Yes |
| TP, TT | Cash tips reported, and the overtime premium (new for 2026) | Yes, still wages | Yes |
So a box 12 code D amount lowers the wages in box 1 but not those in boxes 3 and 5, which is why box 1 is often the smallest wage figure on a W-2. Our guide to FIT taxable wages shows the same split on a pay stub.
What is code DD on a W-2?
Code DD is the cost of health coverage your employer sponsors. It is reported so you can see what the coverage is worth, and the IRS instructions say plainly that the amount reported with code DD is not taxable. You do not add it to your income or enter it anywhere that changes your tax.
What do codes D and W mean?
Code D is the part of your pay you put into a traditional 401(k), including any catch-up contributions, as one total. It does not include your employer’s match, which is not an elective deferral and is not reported in box 12. If you also made Roth 401(k) contributions, those appear separately under code AA.
Code W is everything paid into your health savings account through your employer: the employer’s own contributions plus anything you chose to put in through a cafeteria plan. Your own HSA contributions outside payroll are not in code W.
New for 2026: codes TA, TP and TT
Code TA is an employer contribution to a Trump account of the employee or the employee’s dependent, made under an employer contribution program. Employers can make these from July 4, 2026, and the amount is excluded from the employee’s income when it is paid under such a program.
Code TP is the total cash tips the employee reported to the employer. Tips are still wages for withholding and for Social Security and Medicare. An employer that reports code TP also enters a Treasury tipped occupation code in box 14b.
Code TT is qualified overtime compensation, but only the premium part of it. The IRS gives the example that only the half of time and a half is reported with code TT. The overtime is still wages for withholding and for Social Security and Medicare.
Code TT on a real pay stub
Take a warehouse lead paid weekly with 6 overtime hours. The stub below was calculated by our generator. The regular rate is $22.40 and the overtime rate is $33.60, so the premium is $11.20 an hour.
| Step | Line | Amount |
|---|---|---|
| 3 | Regular pay (40 hours at $22.40) | $896.00 |
| 3 | Overtime (1.5x) (6 hours at $33.60) | $201.60 |
| 4 | Gross pay | $1,097.60 |
| 5 | Income tax wages (gross minus both) | $1,097.60 |
| 5 | Social Security and Medicare wages (gross minus health only) | $1,097.60 |
| 6 | Federal income tax | -$26.87 |
| 7 | Social Security | -$68.05 |
| 7 | Medicare | -$15.92 |
| 8 | Florida income tax | -$0.00 |
| 9 | After-tax deductions (none in this example) | $0.00 |
| 10 | Net pay (gross minus taxes and deductions) | $986.76 |
Six hours at an $11.20 premium is $67.20 for that week. That is the amount that counts toward code TT, not the full $201.60 overtime line. Added up over the year, those weekly premiums make the code TT total on the W-2. Bonuses and second pay rates raise the regular rate, and with it the premium; calculating overtime pay walks through both.
All W-2 box 12 codes
This is every code in the 2026 IRS instructions, grouped by what it covers. The descriptions are the official wording.
| Code | What the amount is |
|---|---|
| Retirement plan deferrals and Roth contributions | |
| D | Elective deferrals under a section 401(k) cash or deferred arrangement plan (including a SIMPLE 401(k) arrangement) |
| E | Elective deferrals under a section 403(b) salary reduction agreement |
| F | Elective deferrals under a section 408(k)(6) salary reduction SEP (this includes elective deferrals made to a Roth SEP IRA) |
| G | Elective deferrals and employer contributions (including nonelective deferrals) to a section 457(b) deferred compensation plan |
| H | Elective deferrals to a section 501(c)(18)(D) tax-exempt organization plan |
| S | Employee salary reduction contributions under a section 408(p) SIMPLE plan (this includes salary reduction contributions made to a Roth SIMPLE IRA) |
| AA | Designated Roth contributions under a section 401(k) plan |
| BB | Designated Roth contributions under a section 403(b) plan |
| EE | Designated Roth contributions under a governmental section 457(b) plan |
| Health coverage and health accounts | |
| DD | Cost of employer-sponsored health coverage |
| W | Employer contributions (including employee contributions through a cafeteria plan) to an employee's health savings account (HSA) |
| R | Employer contributions to an Archer MSA |
| FF | Permitted benefits under a qualified small employer health reimbursement arrangement |
| Tips and overtime (new for 2026: TP, TT) | |
| TP new | Total amount of cash tips reported to the employer |
| TT new | Total amount of qualified overtime compensation |
| A | Uncollected social security or RRTA tax on tips |
| B | Uncollected Medicare tax on tips (but not Additional Medicare Tax) |
| Group-term life insurance | |
| C | Taxable cost of group-term life insurance over $50,000 |
| M | Uncollected social security or RRTA tax on taxable cost of group-term life insurance over $50,000 (former employees only) |
| N | Uncollected Medicare tax on taxable cost of group-term life insurance over $50,000 (but not Additional Medicare Tax) (former employees only) |
| Deferred compensation and stock | |
| Y | Deferrals under a section 409A nonqualified deferred compensation plan |
| Z | Income under a nonqualified deferred compensation plan that fails to satisfy section 409A |
| V | Income from exercise of nonstatutory stock option(s) |
| GG | Income from qualified equity grants under section 83(i) |
| HH | Aggregate deferrals under section 83(i) elections as of the close of the calendar year |
| Other benefits and payments (new for 2026: TA) | |
| TA new | Employer contributions under a section 128 Trump account contribution program paid to a Trump account of an employee or a dependent of an employee |
| T | Adoption benefits |
| J | Nontaxable sick pay |
| L | Substantiated employee business expense reimbursements |
| P | Excludable moving expense reimbursements paid directly to a member of the U.S. Armed Forces or intelligence community |
| Q | Nontaxable combat pay |
| K | 20% excise tax on excess golden parachute payments |
| II | Medicaid waiver payments excluded from gross income under Notice 2014-7 |
What does not go in box 12?
Several things people expect to find in box 12 belong elsewhere. The instructions list them:
- Employer matching contributions and other nonelective employer contributions to a 401(k). These can appear in box 14a but not in box 12.
- After-tax contributions that are not Roth, such as voluntary pension contributions, and required employee contributions.
- Union dues, uniform payments and other information the employer wants to show. These go in box 14a.
How employers enter box 12 codes
Use capital letters for the code and write the amount with a decimal point but no dollar sign or commas, for example AA 1000.00. Contributions made up for an earlier year under the military reemployment law (USERRA) carry the year: D 25 1250.00 for a 2025 make-up amount.
Our W-2 generator takes up to four box 12 entries per form, with every code in a drop-down, and prints employee Copies B, C and 2. Employees can match each amount to the year-to-date column of their last pay stub.
