Form W-2 Box Calculator 2026 — Decode Every W-2 Box
Calculate and explain every W-2 box. Why Box 1 ≠ Box 3 ≠ Box 5. Box 12 codes D, DD, W, AA, BB, E, G explained. Visual W-2 preview with all boxes calculated.
$
$
2026 limit: $23,500 employee; Box 12 Code D $
Box 12 Code AA (Roth 401k) or BB (Roth 403b) $
Section 125 — reduces Box 1, 3, and 5 $
Section 125 — reduces Box 1, 3, and 5 $
Box 12 Code W — not in your Box 1 $
Health or Dependent Care FSA — Section 125 $
Box 12 Code DD — informational, not taxable Your Simulated W-2
W-2 Box Calculation Explanation
Why Are W-2 Boxes Different?
Your W-2 has multiple wage figures because different taxes apply to different wage bases. Understanding why they differ prevents confusion at tax time.
The Formulas
Box 1 (Federal Wages) = Gross − Traditional 401k − Section 125 (health, HSA, FSA)
Box 3 (SS Wages) = Gross − Section 125 only (NOT reduced by 401k)
Box 3 is capped at $184,500 (2026 SS wage base)
Box 5 (Medicare Wages) = Gross − Section 125 only (no cap)
Box 4 (SS Tax) = min(Box 3, $184,500) × 6.2%
Box 6 (Medicare Tax) = Box 5 × 1.45%
Box 3 (SS Wages) = Gross − Section 125 only (NOT reduced by 401k)
Box 3 is capped at $184,500 (2026 SS wage base)
Box 5 (Medicare Wages) = Gross − Section 125 only (no cap)
Box 4 (SS Tax) = min(Box 3, $184,500) × 6.2%
Box 6 (Medicare Tax) = Box 5 × 1.45%
Example
$95,000 salary, $7,000 401(k), $3,600 health premiums, $1,500 HSA, $1,200 FSA:
Box 1: $95,000 − $7,000 − $3,600 − $1,500 − $1,200 = $81,700
Box 3: $95,000 − $3,600 − $1,500 − $1,200 = $88,700 (401k NOT deducted)
Box 5: Same as Box 3 = $88,700 (no cap on Medicare wages)
Box 1: $95,000 − $7,000 − $3,600 − $1,500 − $1,200 = $81,700
Box 3: $95,000 − $3,600 − $1,500 − $1,200 = $88,700 (401k NOT deducted)
Box 5: Same as Box 3 = $88,700 (no cap on Medicare wages)
Extended
Box 12 Code Reference & Discrepancy Investigator
Full Box 12 code reference table and common W-2 discrepancy explanations
Box 12 Code Reference Table
| Code | Description | Taxable? | Affects Box 1? | 2026 Limit |
|---|---|---|---|---|
| D | Traditional 401(k) contributions | No (deferred) | Yes (reduces) | $23,500 |
| E | 403(b) contributions | No (deferred) | Yes (reduces) | $23,500 |
| G | 457(b) contributions (govt) | No (deferred) | Yes (reduces) | $23,500 |
| AA | Roth 401(k) contributions | Yes (after-tax) | No | $23,500 combined |
| BB | Roth 403(b) contributions | Yes (after-tax) | No | $23,500 combined |
| DD | Employer-sponsored health plan cost | No (informational) | No | Report only |
| W | Employer HSA contributions | No (excluded) | Yes (reduces) | $4,300 single (2026) |
| Y | Nonqualified deferred comp (457f) | Yes | Included | No limit |
| C | Group-term life insurance >$50K | Yes (imputed) | Included | N/A |
| P | Excludable moving expense reimbursements | No | Reduces | Actual expenses |
Common W-2 Discrepancy Checker
Frequently Asked Questions
Why is Box 1 on my W-2 different from my salary?
Box 1 (Federal Wages) is your salary minus pre-tax deductions that reduce federal taxable income: 401(k) contributions (traditional), 403(b), 457(b), Section 125 cafeteria plan benefits (health insurance premiums, HSA employer contributions, FSA contributions), and some other pre-tax items. These reduce Box 1 but do NOT reduce Social Security wages (Box 3) — except for Section 125 benefits, which reduce both Box 1 and Box 3/5.
Why are Box 3 and Box 5 different from Box 1?
Box 3 (Social Security Wages) and Box 5 (Medicare Wages) are higher than Box 1 because 401(k)/403(b)/457(b) contributions DO NOT reduce Social Security or Medicare wages. Pre-tax 401(k) reduces your federal taxable income but you still owe FICA on that amount. Section 125 benefits (health insurance, HSA, FSA) reduce ALL three boxes. Box 5 has no wage cap while Box 3 is capped at $184,500 (the 2026 Social Security wage base).
What does Box 12 Code DD mean?
Code DD reports the cost of employer-sponsored health coverage — both the employee and employer share. This amount is informational only and NOT taxable income. It does not affect your tax return. The IRS requires employers to report this to help inform policymakers about the value of employer-sponsored health benefits. Other common Box 12 codes: D (traditional 401k contributions), W (HSA employer contributions), AA (Roth 401k), E (403b).
What is Box 12 Code W?
Code W reports employer contributions to your Health Savings Account (HSA). This amount is excluded from your income (not taxable). If your employer contributed $1,500 to your HSA and you contributed $2,500 through payroll, the total $4,000 may appear in Box 12 Code W. When you file, you report HSA contributions on Form 8889, and the employee's own pre-tax contribution effectively reduces Box 1 wages via the Section 125 deduction.
Why does my W-2 Box 1 seem too low — did my employer make an error?
Not necessarily. Common reasons Box 1 is lower than expected: 401(k) contributions reduce taxable wages, pre-tax health insurance reduces Box 1, FSA or HSA pre-tax elections reduce Box 1, group-term life insurance over $50,000 adds imputed income but you may have missed that, or you may be comparing Box 1 to your gross pay before pre-tax deductions. Add up Code D (401k), Section 125 deductions, and compare the total reduction to the gap between your gross and Box 1.