---
title: "W-2 Box 12 Codes D, AA, DD and W: Meaning and Examples"
description: "Read W-2 Box 12 codes D, AA, DD and W. Reconcile retirement, health-coverage and HSA amounts, avoid double counting, and check the correct form year."
url: "https://blog.checkstubsonline.com/w2-box-12-codes-d-aa-dd-w"
datePublished: "2026-11-16"
---

# W-2 Box 12 Codes D, AA, DD and W: Meaning and Examples

Read W-2 Box 12 codes D, AA, DD and W. Reconcile retirement, health-coverage and HSA amounts, avoid double counting, and check the correct form year.

Published: 2026-11-16

By [Check Stubs Online Editorial Team](https://blog.checkstubsonline.com/editorial-policy#editorial-team)

**W-2 Box 12 uses a letter code plus an amount to identify a particular benefit, contribution or other reportable item.** For the four codes covered here, D identifies traditional employee 401(k) deferrals, AA identifies designated Roth employee 401(k) contributions, DD reports health-coverage cost, and W reports employer HSA funding including employee cafeteria-plan contributions. They are not four interchangeable deductions.

Reviewed November 16, 2026 · Federal explanation using the current 2026 W-2 instructions, IRS retirement guidance and the currently published 2025 HSA publication. These are four selected codes, not the complete Box 12 list. Use the instructions for the year printed on the actual form. Fictional examples assume valid ordinary contributions within applicable limits.

Begin with the code, not the size of the number. A large DD amount can describe coverage cost without being a cash payment or new tax bill. A W amount can contain money withheld from the employee’s pay even though the code’s official label refers to employer contributions.

## In this guide

1. [Separate the code from the entry slot](#box12-slot)
2. [Compare D, AA, DD and W](#box12-chart)
3. [Reconcile traditional and Roth contributions](#box12-retirement)
4. [Read coverage cost under DD](#box12-health)
5. [Trace the funding included in W](#box12-hsa)
6. [Review the year, records and builder](#box12-review)
7. [Box 12 questions](#box12-faq)

<a id="box12-slot"></a>

## The letter in “12a” is not the benefit code

Boxes 12a, 12b, 12c and 12d are entry spaces. The separate code entered within a space identifies the item. Code D can appear in 12a; it does not belong only in the fourth space. Read the printed code together with its corresponding amount before entering it into tax software.

The [IRS W-2 instructions](https://www.irs.gov/instructions/iw2w3) explain this distinction. Copy the actual code rather than replacing it with A simply because it occupies the first slot. If a screen asks for a code and an amount in different fields, keep that pair together.

Form years matter. The current 2026 instructions contain additional codes, including qualified-overtime code TT. A four-code summary cannot resolve every Box 12 entry or establish whether a tax deduction is allowed. Use the applicable year’s full instructions for an unfamiliar code, and ask the issuer about an unclear or missing entry.

<a id="box12-chart"></a>

## Four common codes answer different questions

**Selected W-2 Box 12 codes and the records behind them**

| Code | Item covered here | Useful supporting record | Common mistake |
| --- | --- | --- | --- |
| D | Traditional employee 401(k) elective deferrals | Annual employee pre-tax deferral detail | Adding the employer match to the employee amount |
| AA | Designated Roth employee 401(k) contributions | Annual designated Roth contribution detail | Treating every after-tax deduction as Roth |
| DD | Reported employer-sponsored health-coverage cost | Benefits administrator’s reportable-cost calculation | Assuming it is all employee premiums or extra taxable pay |
| W | Employer HSA contributions, including employee cafeteria-plan funding | Employer and qualifying salary-reduction HSA detail | Assuming only the company-funded share belongs here |

Each row identifies a category; it does not calculate the employee’s annual contribution limit or final tax liability. A code appearing on a W-2 does not, by itself, prove that every contribution met its eligibility requirements. Follow up when the underlying records show an excess, correction or unusual allocation.

<a id="box12-retirement"></a>

## D and AA distinguish two employee 401(k) contribution types

The [IRS retirement-contribution withholding chart](https://www.irs.gov/retirement-plans/retirement-plan-faqs-regarding-contributions-are-retirement-plan-contributions-subject-to-withholding-for-fica-medicare-or-federal-income-tax) separates ordinary pre-tax employee salary deferrals from designated Roth deferrals. Pre-tax deferrals generally reduce federal income-tax wages, while designated Roth deferrals remain in those wages. Both generally remain subject to employee Social Security and Medicare taxation under the chart’s ordinary rules.

Do not subtract the Box 12 amount again from a correctly prepared Box 1 simply because tax software also asks for the code. Box 1 and the coded disclosure serve different reporting purposes. Our [guide to W-2 wage-box differences](https://blog.checkstubsonline.com/w2-boxes-1-3-5-different) explains the wage reconciliation separately.

For an original annual example, assume 26 paychecks each contain $180 of traditional employee 401(k) deferrals and $70 of designated Roth employee contributions. The annual employee totals are $4,680 for D and $1,820 for AA. Together, those elective amounts equal $6,500.

![A fictional annual retirement record has 4680 dollars of pre-tax employee 401(k) deferrals under code D and 1820 dollars of designated Roth employee 401(k) contributions under AA. A separate 1560 dollar non-Roth employer match is not added to code D.](https://blog.checkstubsonline.com/assets/articles/w2-box-12-codes-d-aa-dd-w-records.webp)

A traditional employee deferral, a designated Roth employee contribution and an employer match are different source categories. This figure is a reconciliation example, not a contribution-limit calculation.

Assume the same employer separately contributes a $1,560 ordinary non-Roth match. That match does not turn the employee’s D total into $6,240. The source ledger should preserve who funded each amount and its contribution type.

“After-tax” also does not automatically mean “designated Roth.” A voluntary non-Roth after-tax plan contribution is a different category. Review the plan’s actual labels before mapping a payroll deduction to AA. Special employer Roth contributions have their own reporting treatment; this employee-deferral example does not cover them.

<a id="box12-health"></a>

## DD is coverage-cost reporting, not a second paycheck deduction

The [IRS health-coverage reporting page](https://www.irs.gov/affordable-care-act/form-w-2-reporting-of-employer-sponsored-health-coverage) explains that reporting the cost does not make otherwise excludable coverage taxable. The reportable amount generally combines employer and employee portions. Reporting rules and transition relief also mean a blank DD field does not automatically establish that the employee lacked coverage.

Consider a fictional benefits administrator’s calculation for coverage included under DD. It assigns $6,960 to the employer-funded share and $2,220 to the employee-funded share. The combined reportable cost is $9,180. Comparing $9,180 only with the employee’s $2,220 payroll deductions would incorrectly suggest a $6,960 deduction error.

**Fictional DD coverage-cost reconciliation**

| Component | Annual amount | Meaning in this example |
| --- | --- | --- |
| Employer share | $6,960 | Part of reportable coverage cost |
| Employee share | $2,220 | Other part of the same cost |
| DD amount | $9,180 | Combined reported coverage cost |

The illustration assumes those are the administrator’s reportable components; it does not price a policy or decide which benefits must be included. HSA contributions belong under a different reporting rule, not automatically inside DD. Ask the administrator about coverage changes, employer contributions or included benefit types before expecting a simple deduction total to match.

Our [employer-paid benefits guide](https://blog.checkstubsonline.com/employer-paid-benefits-pay-stub) gives further context for distinguishing a benefit’s cost from cash earnings and employee deductions.

<a id="box12-hsa"></a>

## W can include employee salary-reduction contributions

[IRS Publication 969](https://www.irs.gov/publications/p969) treats employee HSA salary reductions through a cafeteria plan as employer contributions for this reporting purpose. Consequently, code W can include both company-funded money and the employee’s qualifying payroll funding. Its label should not be read as “company money only.”

Assume an eligible fictional employee receives $900 of employer HSA funding and contributes $1,500 through the employer’s cafeteria plan during the same year. Both are valid contributions within the applicable limit, with no prior-year allocation or correction. Their code W total is $2,400.

![A fictional eligible employee has 900 dollars of employer HSA funding and 1500 dollars of salary-reduction funding through a cafeteria plan. These total 2400 dollars under code W. A separate 350 dollar personal contribution is not included in that W-2 amount.](https://blog.checkstubsonline.com/assets/articles/w2-box-12-codes-d-aa-dd-w-checks.webp)

The $1,500 salary-reduction amount is already part of W. Treating the whole $2,400 as a new personal deduction would count the same funding incorrectly.

Now assume the employee separately contributes $350 directly to the HSA from a personal bank account for that same contribution year. That personal funding is outside this W-2’s $2,400 W amount. The source worksheet therefore tracks $2,750 of contributions across both routes, subject to the employee’s actual eligibility and limit.

Use the applicable Form 8889 instructions to classify and report those amounts. Do not claim an additional personal deduction for employer or cafeteria-plan funding already receiving the relevant exclusion. Check contribution-year designations as well: the timing of a deposit, the W-2 reporting year and the HSA contribution year can require reconciliation rather than a blind comparison.

Code W is not the account’s year-end balance. Investment changes, distributions, transfers and earlier savings can affect a balance without being new W-2 contributions. Compare like-for-like funding records before asking payroll or the HSA custodian to investigate a difference.

<a id="box12-review"></a>

## Check the actual year and source records before preparing a form

Review the employer, employee and tax year first. Then trace each code to annual payroll or benefit records. Preserve the separate code-and-amount pairs, and investigate any year-end adjustment rather than assuming the final ordinary paycheck contains every annual reporting entry.

If the issuer’s W-2 appears wrong, request an explanation and an employer correction where appropriate. A privately edited replacement does not correct the issuer’s report. Our [former-employer W-2 guide](https://blog.checkstubsonline.com/w2-from-former-employer) covers obtaining the issued record, and the [deduction guide](https://blog.checkstubsonline.com/pre-tax-vs-post-tax-deductions) explains related paycheck labels.

As checked on November 16, 2026, the [Check Stubs Online W-2 builder](https://www.checkstubsonline.com/forms/w2/create) currently offers tax year 2025, with actual payroll-total entry and up to four Box 12 entries. This article’s current 2026 explanation does not mean the builder offers a 2026 form. Select the correct supported year and review its linked year-specific IRS instructions.

Use actual authorized annual records and inspect the completed preview. The PDF preparation tool is not government filing, does not verify contribution eligibility and does not replace an employer’s correction process. Do not change a form’s year or invent a code to fit an unsupported entry.

<a id="box12-faq"></a>

## Box 12 questions

### Should I add every Box 12 amount to wages?

No. Codes describe different items with different treatment. Adding the whole box can count an informational cost or an already-reported amount incorrectly.

### Why is W larger than my employer’s HSA contribution?

It can include your salary reductions through the employer’s cafeteria plan. Compare both funding sources and the contribution-year details.

### Does DD show the amount I paid for health insurance?

Generally it reports combined reportable coverage cost, rather than only your deductions. Use the administrator’s cost detail to reconcile it.

### Is 12a the same as code A?

No. The slot and the entered code are separate. Read the actual code printed next to the amount.

The Check Stubs Online Editorial Team checked the current primary guidance and live builder, and independently reconciled the fictional retirement, coverage-cost and HSA examples.

## Relevant document tool

Prepare the correct supported year from actual payroll totals

Keep contribution types and code-and-amount pairs separate, then inspect the complete W-2 preview.

[Review the W-2 builder](https://www.checkstubsonline.com/forms/w2/create)

The builder currently offers 2025, as checked November 16, 2026. PDF preparation is not government filing, eligibility verification or an employer-issued correction.

## Related guides

- [Why W-2 Boxes 1, 3 and 5 Are Different: Wage Examples](https://blog.checkstubsonline.com/w2-boxes-1-3-5-different)
- [How to Get a W-2 From a Former Employer](https://blog.checkstubsonline.com/w2-from-former-employer)
- [Pre-Tax vs. Post-Tax Deductions: Read Your Paycheck](https://blog.checkstubsonline.com/pre-tax-vs-post-tax-deductions)
