{
  "metadata": {
    "calculator": "LLC vs S-Corp Tax Calculator",
    "taxYear": 2026,
    "totalTests": 10,
    "generationDate": "2026-07-20",
    "description": "All test cases for the CalcWise LLC vs S-Corp Tax Calculator."
  },
  "testCases": [
    {
      "id": "sp-fica-basic",
      "name": "Default scenario: 80k income, 40k salary, single, 2026",
      "category": "order-of-operations",
      "source": "IRC 3101, 3111, 1401; Schedule SE; Rev. Proc. 2025-32",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "seTaxTotal": 11303.64,
        "totalFica": 6120,
        "netAnnualBenefit": 2856.02
      },
      "tolerance": 1,
      "actualOutput": {
        "seTaxTotal": 11303.64,
        "totalFica": 6120,
        "netAnnualBenefit": 2856.02
      }
    },
    {
      "id": "ss-wage-base-cap",
      "name": "Above SS wage base: 300k income, 150k salary, single",
      "category": "order-of-operations",
      "source": "IRC 3101, 3111; SSA 2026 COLA notice",
      "input": {
        "netBusinessIncome": 300000,
        "reasonableSalary": 150000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "socialSecurityPortion": 22878,
        "employerSocialSecurityTax": 9300,
        "employeeSocialSecurityTax": 9300
      },
      "tolerance": 5,
      "actualOutput": {
        "socialSecurityPortion": 22878,
        "employerSocialSecurityTax": 9300,
        "employeeSocialSecurityTax": 9300
      }
    },
    {
      "id": "add-medicare",
      "name": "Additional Medicare Tax: 350k income, 220k salary, single",
      "category": "order-of-operations",
      "source": "IRC 3101(b)(2); IRS Topic 560",
      "input": {
        "netBusinessIncome": 350000,
        "reasonableSalary": 220000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "scorpAdditionalMedicare": 180
      },
      "tolerance": 1,
      "actualOutput": {
        "scorpAdditionalMedicare": 180
      }
    },
    {
      "id": "salary-zero",
      "name": "Salary 0 with positive income (audit warning)",
      "category": "edge-case",
      "source": "IRS S-corp compensation page",
      "input": {
        "netBusinessIncome": 100000,
        "reasonableSalary": 0,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "totalFica": 0,
        "k1Income": 100000
      },
      "tolerance": 1,
      "actualOutput": {
        "totalFica": 0,
        "k1Income": 100000
      }
    },
    {
      "id": "salary-equals-income",
      "name": "Salary equals income (no distribution)",
      "category": "edge-case",
      "source": "IRC 3111; Form 1120-S instructions",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 80000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "distribution": 0
      },
      "tolerance": 1,
      "actualOutput": {
        "distribution": 0
      }
    },
    {
      "id": "qbi-below-threshold",
      "name": "QBI below threshold: 80k income, single",
      "category": "order-of-operations",
      "source": "IRC 199A; Rev. Proc. 2025-32 sec. 4.26",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "soleQbiDeduction": 11649.64,
        "scorpQbiDeduction": 7388
      },
      "tolerance": 5,
      "actualOutput": {
        "soleQbiDeduction": 11649.64,
        "scorpQbiDeduction": 7388
      }
    },
    {
      "id": "state-tax",
      "name": "State franchise tax increases S-corp total",
      "category": "order-of-operations",
      "source": "Calculator design (user-entered cost)",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200,
        "stateFranchiseTax": 2000
      },
      "expected": {
        "stateTaxIncrease": 2000
      },
      "tolerance": 1,
      "actualOutput": {
        "stateTaxIncrease": 2000
      }
    },
    {
      "id": "mfj-brackets",
      "name": "MFJ standard deduction is 32200",
      "category": "year-specific",
      "source": "Rev. Proc. 2025-32 sec. 4.14",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "mfj",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "standardDeduction": 32200
      },
      "tolerance": 0,
      "actualOutput": {
        "standardDeduction": 32200
      }
    },
    {
      "id": "hoh-brackets",
      "name": "HOH standard deduction is 24150",
      "category": "year-specific",
      "source": "Rev. Proc. 2025-32 sec. 4.14",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "hoh",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "standardDeduction": 24150
      },
      "tolerance": 0,
      "actualOutput": {
        "standardDeduction": 24150
      }
    },
    {
      "id": "break-even",
      "name": "Break-even income exists and is positive",
      "category": "order-of-operations",
      "source": "Calculator design (binary search)",
      "input": {
        "netBusinessIncome": 80000,
        "reasonableSalary": 40000,
        "filingStatus": "single",
        "taxYear": 2026,
        "payrollComplianceCost": 1200
      },
      "expected": {
        "breakEvenPositive": true
      },
      "tolerance": 0,
      "actualOutput": {
        "breakEvenPositive": true
      }
    }
  ]
}