Skip to content
Independent money guidance
Clear Money Guide
Start here
Menu

W-2 Box 12 vs Box 1 and Box 3: Why They Differ

Updated September 29, 2026. Quick answer: pre-tax elective deferrals (codes D, E, F, G and S) are left out of Box 1 but included in Box 3, and Box 5 follows Box 3 without the wage base cap. Roth deferrals (codes AA, BB and EE) are included in Boxes 1, 3 and 5.

Box 1: what is left out

The Box 1 instruction says to report total taxable wages, tips and other compensation, “However, do not include elective deferrals (such as employee contributions to a section 401(k) or 403(b) plan) except section 501(c)(18) contributions.”

Box 3: what is put back

“Report in box 3 elective deferrals to certain qualified cash or deferred compensation arrangements and to retirement plans described in box 12 (codes D, E, F, G, and S) even though the deferrals are not includible in box 1.” Box 3 also has a cap: “The total of boxes 3 and 7 cannot exceed $184,500 (2026 maximum social security wage base).”

Box 5 follows Box 3, without the cap

“The wages and tips subject to Medicare tax are the same as those subject to social security tax (boxes 3 and 7) except that there is no wage base limit for Medicare tax.” The instructions’ example: “You paid your employee $199,750 in wages. Enter in box 3 (social security wages) 184500.00, but enter in box 5 (Medicare wages and tips) 199750.00.”

Roth deferrals are treated differently

“Designated Roth contributions are subject to federal income tax withholding and social security and Medicare taxes (and railroad retirement taxes, if applicable) and must be reported in boxes 1, 3, and 5.”

The three boxes side by side

Box 12 codeBox 1Box 3Box 5
D, E, F, G, S (pre-tax deferrals)ExcludedIncludedSame as Box 3, no cap
AA, BB, EE (designated Roth)IncludedIncludedIncluded

Box 4 check

Box 4 (social security tax withheld) is capped by formula. The instructions say for 2026 the amount “should not exceed $11,439 ($184,500 × 6.2%).” That is the wage base above times the 6.2% employee rate: 184,500 × 0.062 = 11,439.

Common mistakes

  • Assuming Box 1, Box 3 and Box 5 should match. Pre-tax deferrals and the social security wage base both make them differ.
  • Treating a lower Box 1 as an error. The IRS instruction excludes elective deferrals from Box 1.

Related: code D, code E, code G, code S, code AA, code BB, code EE, code H, code C, codes A and B, code W, code T, code P, code V, code Z, code GG, and what Roth versus pre-tax does to a paycheck.

Every code in one place: the Box 12 codes table. If a withdrawal from one of these accounts is your question, see the Form 1099-R Box 7 codes.

Figures verified against the IRS 2026 General Instructions for Forms W-2 and W-3 (Box 12 and special reporting sections) on September 30, 2026.

Sources

Code meanings are read from the IRS 2026 General Instructions for Forms W-2 and W-3 (Box 12) at irs.gov on September 29, 2026. General information, not tax advice. Your own facts decide the outcome, and a payroll professional, a preparer or the IRS is the right place to confirm anything consequential.