{
  "id": "w2",
  "version": "bcd9bfea147b",
  "status": "published",
  "name": "W2 Calculator",
  "question": "What will my W2 wages be?",
  "summary": "Works out the wage boxes of your Form W-2 (box 1 taxable wages, boxes 3 and 5 Social Security and Medicare wages, boxes 4 and 6 tax withheld) from gross pay and pre-tax deductions.",
  "category": "finance",
  "subcategory": "tax-and-pay",
  "url": "https://www.acalculator.org/finance/w2-calculator",
  "markdown": "https://www.acalculator.org/finance/w2-calculator.md",
  "kind": "function",
  "method": "Box 5 = gross − section 125 − commuter benefits. Box 1 = box 5 − pre-tax retirement deferrals. Box 3 = the lesser of box 5 and the Social Security wage base ($184,500 in 2026). Box 4 = 6.2% × box 3. Box 6 = 1.45% × box 5 + 0.9% × (box 5 − $200,000, if above 0). Box 12 = the deferrals.",
  "assumptions": [
    "One employer for the whole year. With two jobs, each W-2 has its own wage base and $200,000 withholding threshold.",
    "Roth 401(k) contributions, after-tax deductions, and wage garnishments do not change any wage box.",
    "Group-term life insurance over $50,000, taxable fringe benefits, dependent care benefits over $5,000, and commuter benefits over the monthly limit add to the boxes and are not included.",
    "Box 2 (federal income tax withheld) depends on your Form W-4 and pay periods: use the federal withholding calculator."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "gross": {
        "title": "Gross pay for the year",
        "description": "All pay before any deduction: salary, hourly pay, overtime, bonuses, commissions, taxable tips.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "k401": {
        "title": "Pre-tax retirement deferrals",
        "description": "Traditional (not Roth) 401(k), 403(b), 457(b), or SIMPLE IRA contributions taken from your pay (box 12 codes D, E, G, S).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "sec125": {
        "title": "Section 125 deductions",
        "description": "Pre-tax health, dental, and vision premiums, health or dependent care FSA, and HSA contributions through payroll.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "commute": {
        "title": "Pre-tax commuter benefits",
        "description": "Transit pass and parking taken pre-tax for the year: at most $340 a month each in 2026, $8,160 a year.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 8160
      },
      "year": {
        "title": "W-2 year",
        "description": "The year of the pay. A year with no published wage base uses the latest year this site has.",
        "type": "integer",
        "minimum": 2026,
        "maximum": 2035
      }
    }
  },
  "outputs": {
    "box1": {
      "label": "Box 1: wages, tips, other compensation",
      "description": "Gross pay less retirement deferrals, section 125 deductions, and commuter benefits.",
      "format": "money"
    },
    "box3": {
      "label": "Box 3: Social Security wages",
      "description": "Gross pay less section 125 and commuter deductions, up to the wage base.",
      "format": "money"
    },
    "box4": {
      "label": "Box 4: Social Security tax withheld",
      "description": "6.2% of box 3.",
      "format": "money"
    },
    "box5": {
      "label": "Box 5: Medicare wages and tips",
      "description": "Gross pay less section 125 and commuter deductions, with no limit.",
      "format": "money"
    },
    "box6": {
      "label": "Box 6: Medicare tax withheld",
      "description": "1.45% of box 5, plus 0.9% of box 5 over $200,000.",
      "format": "money"
    },
    "box12": {
      "label": "Box 12: retirement deferrals",
      "description": "The pre-tax deferrals, shown with their code (D for a 401(k)).",
      "format": "money"
    },
    "excluded": {
      "label": "Left out of every wage box",
      "description": "Section 125 deductions plus commuter benefits.",
      "format": "money"
    },
    "gap": {
      "label": "Box 5 minus box 1",
      "description": "Why box 1 is lower than your Medicare wages: the retirement deferrals.",
      "format": "money"
    },
    "notice": {
      "label": "Note",
      "description": "A note when another year’s wage base was used.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "gross": 75000,
      "k401": 6000,
      "sec125": 3000,
      "commute": 0,
      "year": 2026
    },
    "outputs": {
      "box1": 66000,
      "box3": 72000,
      "box4": 4464,
      "box5": 72000,
      "box6": 1044,
      "box12": 6000,
      "excluded": 3000,
      "gap": 6000
    },
    "text": "On $75,000.00 of gross pay, box 1 of your W-2 shows $66,000.00, and boxes 3 and 5 show $72,000.00 and $72,000.00."
  },
  "examples": [
    {
      "given": {
        "gross": 75000,
        "k401": 6000,
        "sec125": 3000,
        "commute": 1200
      },
      "expect": {
        "box1": 64800,
        "box3": 70800,
        "box4": 4389.6,
        "box5": 70800,
        "box6": 1026.6,
        "box12": 6000
      },
      "source": "IRS 401(k) plan overview (deferrals stay in Social Security and Medicare wages); IRS cafeteria plan FAQ and Pub 15-B Table 2-1 (section 125 and commuter benefits excluded from all three); 6.2% and 1.45% (Pub 15, 2026); Python 3 check in docs/progress/WP-112/check.py"
    },
    {
      "given": {
        "gross": 250000,
        "k401": 24500,
        "sec125": 0,
        "commute": 0
      },
      "expect": {
        "box1": 225500,
        "box3": 184500,
        "box4": 11439,
        "box5": 250000,
        "box6": 4075
      },
      "source": "Pub 15 (2026): Social Security wage base $184,500; Additional Medicare Tax withheld at 0.9% over $200,000; Python 3 check in docs/progress/WP-112/check.py"
    },
    {
      "given": {
        "gross": 40000,
        "k401": 0,
        "sec125": 0,
        "commute": 0
      },
      "expect": {
        "box1": 40000,
        "box3": 40000,
        "box4": 2480,
        "box6": 580
      },
      "source": "No pre-tax deductions: all three wage boxes equal gross pay; 6.2% × 40,000 and 1.45% × 40,000"
    }
  ],
  "sources": [
    "IRS, General Instructions for Forms W-2 and W-3 (2026). https://www.irs.gov/instructions/iw2w3 (retrieved 2026-10-05)",
    "IRS, 401(k) resource guide, plan participants: 401(k) plan overview (deferrals are wages for Social Security, Medicare, and FUTA). https://www.irs.gov/retirement-plans/plan-participant-employee/401k-resource-guide-plan-participants-401k-plan-overview (retrieved 2026-10-05)",
    "IRS, FAQs for government entities regarding cafeteria plans (salary reductions not wages for income tax, FICA, or FUTA). https://www.irs.gov/government-entities/federal-state-local-governments/faqs-for-government-entities-regarding-cafeteria-plans (retrieved 2026-10-05)",
    "IRS, Publication 15-B (2026), Employer’s Tax Guide to Fringe Benefits: Table 2-1 and the $340 monthly transportation limits. https://www.irs.gov/publications/p15b (retrieved 2026-10-05)",
    "IRS, Publication 15 (2026), Employer’s Tax Guide: Social Security wage base $184,500, rates, and Additional Medicare Tax withholding. https://www.irs.gov/publications/p15 (retrieved 2026-10-05)"
  ],
  "related": [
    "paycheck",
    "federal-withholding",
    "payroll-tax",
    "w4"
  ],
  "changelog": []
}
