{
  "metadata": {
    "calculator": "Quarterly Estimated Tax Calculator",
    "taxYear": 2026,
    "totalTests": 16,
    "generationDate": "2026-07-20",
    "description": "All test cases for the CalcWise Quarterly Estimated Tax Calculator."
  },
  "testCases": [
    {
      "id": "A1",
      "name": "$60k net SE profit, Single, 2026 - total tax computation",
      "category": "total-tax",
      "source": "Pub. 505 (2026), Worksheet 2-1 and Tax Computation Worksheets",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 10000,
        "priorYearAGI": 50000
      },
      "expected": {
        "seTax": 8477.73,
        "seTaxDeduction": 4238.87,
        "agi": 55761.13,
        "standardDeduction": 16100,
        "taxableIncome": 39661.13,
        "incomeTax": 4511.34,
        "totalEstimatedTax": 12989.07
      },
      "tolerance": 0.02
    },
    {
      "id": "A2",
      "name": "$200k net SE profit, MFJ, 2026 - SS wage base cap + 22% bracket",
      "category": "total-tax",
      "source": "Pub. 505 (2026), Worksheet 2-1; SSA 2026 wage base $184,500",
      "input": {
        "netSelfEmploymentProfit": 200000,
        "taxYear": 2026,
        "filingStatus": "mfj",
        "priorYearTotalTax": 40000,
        "priorYearAGI": 180000
      },
      "expected": {
        "seTax": 28234.30,
        "seTaxDeduction": 14117.15,
        "agi": 185882.85,
        "taxableIncome": 153682.85,
        "incomeTax": 23234.23,
        "totalEstimatedTax": 51468.53
      },
      "tolerance": 0.02
    },
    {
      "id": "A3",
      "name": "$500k net SE profit, Single, 2026 - 35% bracket + Additional Medicare",
      "category": "total-tax",
      "source": "Pub. 505 (2026), Tax Computation Worksheets; IRC §1401(b)(2)",
      "input": {
        "netSelfEmploymentProfit": 500000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 100000,
        "priorYearAGI": 200000
      },
      "expected": {
        "seTax": 38624.50,
        "seTaxDeduction": 18134.38,
        "agi": 481865.62,
        "taxableIncome": 465765.62,
        "incomeTax": 131787.22,
        "totalEstimatedTax": 170411.72
      },
      "tolerance": 0.02
    },
    {
      "id": "A4",
      "name": "$80k net SE profit, HoH, 2026 - HoH brackets",
      "category": "total-tax",
      "source": "Pub. 505 (2026), Tax Computation Worksheets for HoH",
      "input": {
        "netSelfEmploymentProfit": 80000,
        "taxYear": 2026,
        "filingStatus": "hoh",
        "priorYearTotalTax": 12000,
        "priorYearAGI": 60000
      },
      "expected": {
        "seTax": 11303.64,
        "standardDeduction": 24150,
        "taxableIncome": 50198.18,
        "incomeTax": 5669.78,
        "totalEstimatedTax": 16973.42
      },
      "tolerance": 0.02
    },
    {
      "id": "B1",
      "name": "Safe harbor comparison - prior-year 100% wins",
      "category": "safe-harbor",
      "source": "IRC §6654(d)(1); Pub. 505 Worksheet 2-1 lines 12a-12c",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 10000,
        "priorYearAGI": 50000
      },
      "expected": {
        "safeHarbor90": 11690.16,
        "safeHarborPrior": 10000,
        "requiredAnnualPayment": 10000,
        "safeHarborUsed": "100% of prior year"
      },
      "tolerance": 0.02
    },
    {
      "id": "B2",
      "name": "Safe harbor comparison - 110% for higher income (MFJ, AGI > $150k)",
      "category": "safe-harbor",
      "source": "IRC §6654(d)(1)(C); Form 2210 instructions",
      "input": {
        "netSelfEmploymentProfit": 200000,
        "taxYear": 2026,
        "filingStatus": "mfj",
        "priorYearTotalTax": 40000,
        "priorYearAGI": 180000
      },
      "expected": {
        "safeHarbor90": 46321.68,
        "safeHarborPrior": 44000,
        "requiredAnnualPayment": 44000,
        "safeHarborUsed": "110% of prior year"
      },
      "tolerance": 0.02
    },
    {
      "id": "C1",
      "name": "Quarterly installment - $10k required, no withholding",
      "category": "order-of-operations",
      "source": "Pub. 505 Worksheet 2-1 lines 13-15",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 10000,
        "priorYearAGI": 50000
      },
      "expected": {
        "totalEstimatedPayments": 10000,
        "quarterlyPayment": 2500,
        "paymentsRequired": true
      },
      "tolerance": 0.02
    },
    {
      "id": "D1",
      "name": "De minimis exception - total tax under $1,000",
      "category": "validation",
      "source": "IRC §6654(e)(1); Pub. 505 'Who Does Not Have To Pay Estimated Tax'",
      "input": {
        "netSelfEmploymentProfit": 5000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 5000,
        "priorYearAGI": 30000
      },
      "expected": {
        "under1000": true,
        "paymentsRequired": false,
        "quarterlyPayment": 0
      },
      "tolerance": 0.02
    },
    {
      "id": "D2",
      "name": "No prior-year tax liability exception",
      "category": "validation",
      "source": "IRC §6654(e)(2); Form 2210 instructions 'Exceptions to the Penalty'",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 0,
        "priorYearAGI": 0
      },
      "expected": {
        "noPriorYearLiability": true,
        "paymentsRequired": false
      },
      "tolerance": 0.02
    },
    {
      "id": "E1",
      "name": "Due dates for TY 2026",
      "category": "year-specific",
      "source": "Pub. 505 Table 2-1, 'When To Pay Estimated Tax'",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 10000,
        "priorYearAGI": 50000
      },
      "expected": {
        "dueDateCount": 4,
        "q1Date": "April 15, 2026",
        "q2Date": "June 15, 2026",
        "q3Date": "September 15, 2026",
        "q4Date": "January 15, 2027"
      },
      "tolerance": 0
    },
    {
      "id": "F1",
      "name": "Annualized income method - seasonal income",
      "category": "order-of-operations",
      "source": "Pub. 505 Worksheet 2-9, annualization amounts and applicable %",
      "input": {
        "mode": "annualized",
        "periodProfits": [10000, 20000, 15000, 15000],
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 8000,
        "priorYearAGI": 40000
      },
      "expected": {
        "requiredAnnualPayment": 8000,
        "periodCount": 4,
        "p1ApplicablePct": 0.225,
        "p2ApplicablePct": 0.45,
        "p3ApplicablePct": 0.675,
        "p4ApplicablePct": 0.90
      },
      "tolerance": 0.02
    },
    {
      "id": "F2",
      "name": "Annualized SE tax computation (Section B of Worksheet 2-9)",
      "category": "order-of-operations",
      "source": "Pub. 505 Worksheet 2-9 Section B, lines 33-43",
      "input": {
        "mode": "annualized",
        "periodProfits": [10000, 20000, 15000, 15000],
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 8000,
        "priorYearAGI": 40000
      },
      "expected": {
        "p1SeTax": 5651.82,
        "p1NetEarnings": 9235
      },
      "tolerance": 0.02
    },
    {
      "id": "G1",
      "name": "Underpayment penalty estimate",
      "category": "order-of-operations",
      "source": "Form 2210 instructions; IRS Quarterly Interest Rates 2026",
      "input": {
        "netSelfEmploymentProfit": 60000,
        "taxYear": 2026,
        "filingStatus": "single",
        "priorYearTotalTax": 10000,
        "priorYearAGI": 50000,
        "actualPayments": [0, 2500, 2500, 2500]
      },
      "expected": {
        "penaltyQ1Underpayment": 2500,
        "penaltyTotalGreaterThanZero": true
      },
      "tolerance": 0.50
    },
    {
      "id": "J1",
      "name": "2026 standard deductions by filing status",
      "category": "year-specific",
      "source": "Pub. 505 (2026), 'What's New for 2026'",
      "input": {},
      "expected": {
        "single": 16100,
        "mfj": 32200,
        "hoh": 24150,
        "mfs": 16100
      },
      "tolerance": 0
    },
    {
      "id": "J2",
      "name": "2026 underpayment interest rates",
      "category": "year-specific",
      "source": "IRS Quarterly Interest Rates page; IRB 2025-48, 2026-08, 2026-22",
      "input": {},
      "expected": {
        "q1Rate": 0.07,
        "q2Rate": 0.06,
        "q3Rate": 0.07,
        "q4RatePlaceholder": 0.07,
        "q4Verify": true
      },
      "tolerance": 0
    },
    {
      "id": "J3",
      "name": "2026 annualization amounts and applicable percentages",
      "category": "year-specific",
      "source": "Pub. 505 Worksheet 2-9, lines 2 and 22",
      "input": {},
      "expected": {
        "annualizationAmounts": [4, 2.4, 1.5, 1],
        "applicablePercentages": [0.225, 0.45, 0.675, 0.90]
      },
      "tolerance": 0
    }
  ]
}
