{
  "$comment": "Machine-readable companion to https://valem.run/calculators/usa/self-employed. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/usa/self-employed",
  "dataUrl": "https://valem.run/calculators/usa/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "USA self-employed (federal) model by Valem (https://valem.run/calculators/usa/self-employed), CC BY 4.0.",
    "note": "Covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds themselves are law and are not licensed by anyone; the cited sources are where they come from."
  },
  "verificationUrl": "https://valem.run/calculators/usa/self-employed/verify",
  "country": "usa",
  "countryName": "USA",
  "formula": "self-employed",
  "formulaName": "Self-employed (federal)",
  "title": "Self-Employment Tax Calculator USA",
  "answer": "Your federal net income as a US sole proprietor is net earnings minus self-employment tax at 15.3% of 92.35% of them, then federal income tax after deducting half the SE tax, the 20% QBI deduction and the standard deduction.",
  "lang": "en",
  "currency": "USD",
  "taxYear": "2026",
  "verification": {
    "claim": "shape-only",
    "statement": "The rates in this model are illustrative. Its 3 self-test cases confirm the engine reproduces the shape of the charge, but the schedule is not the official one, so the amount will not match a real bill. The cited sources name the document that would replace it.",
    "selfTestCases": 3,
    "ratesAreIllustrative": true,
    "sourcesCheckedOn": "2026-08-22"
  },
  "sources": [
    {
      "label": "IRS — Self-employment tax (Social Security and Medicare taxes)",
      "url": "https://www.irs.gov/businesses/small-businesses-self-employed/self-employment-tax-social-security-and-medicare-taxes",
      "checked": "2026-08-22"
    },
    {
      "label": "2026 federal income tax brackets and standard deduction (Rev. Proc. 2025-32)",
      "url": "https://taxfoundation.org/data/all/federal/2026-tax-brackets/",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "netEarnings",
      "type": "number",
      "label": "Annual net business earnings (USD)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "seTaxBase",
      "type": "number",
      "formula": "$round(netEarnings * $const.seBase, 2)"
    },
    {
      "name": "selfEmploymentTax",
      "type": "number",
      "label": "Self-employment tax",
      "format": "number",
      "formula": "$round($const.ssRate * $min([seTaxBase, $const.ssWageBase]) + $const.medicareRate * seTaxBase, 2)"
    },
    {
      "name": "qbiDeduction",
      "type": "number",
      "label": "QBI deduction (20%)",
      "format": "number",
      "formula": "$round($const.qbiRate * $max([0, netEarnings - selfEmploymentTax / 2]), 2)"
    },
    {
      "name": "taxableIncome",
      "type": "number",
      "formula": "$round($max([0, netEarnings - selfEmploymentTax / 2 - qbiDeduction - $const.standardDeduction]), 2)"
    },
    {
      "name": "federalIncomeTax",
      "type": "number",
      "label": "Federal income tax",
      "format": "number",
      "formula": "($t := taxableIncome; $round($const.r1 * $min([$t, $const.b1]) + $const.r2 * $max([0, $min([$t, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$t, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$t, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $min([$t, $const.b5]) - $const.b4]) + $const.r6 * $max([0, $min([$t, $const.b6]) - $const.b5]) + $const.r7 * $max([0, $t - $const.b6]), 2))"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year (federal only)",
      "format": "number",
      "formula": "$round($max([0, netEarnings - selfEmploymentTax - federalIncomeTax]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "100,000 USD net earnings — a typical full-time contractor",
      "given": {
        "netEarnings": 100000
      },
      "expect": {
        "seTaxBase": 92350,
        "selfEmploymentTax": 14129.55,
        "qbiDeduction": 18587.05,
        "taxableIncome": 58248.18,
        "federalIncomeTax": 7526.6,
        "netIncome": 78343.85
      }
    },
    {
      "description": "40,000 USD — part-time",
      "given": {
        "netEarnings": 40000
      },
      "expect": {
        "seTaxBase": 36940,
        "selfEmploymentTax": 5651.82,
        "qbiDeduction": 7434.82,
        "taxableIncome": 13639.27,
        "federalIncomeTax": 1388.71,
        "netIncome": 32959.47
      }
    },
    {
      "description": "250,000 USD — above the Social Security wage base",
      "given": {
        "netEarnings": 250000
      },
      "expect": {
        "seTaxBase": 230875,
        "selfEmploymentTax": 29573.38,
        "qbiDeduction": 47042.66,
        "taxableIncome": 172070.65,
        "federalIncomeTax": 33894.96,
        "netIncome": 186531.66
      }
    }
  ],
  "spec": {
    "id": "self-employed-usa",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "netEarnings": {
          "type": "number",
          "minimum": 0
        },
        "seTaxBase": {
          "type": "number",
          "readOnly": true
        },
        "selfEmploymentTax": {
          "type": "number",
          "readOnly": true
        },
        "qbiDeduction": {
          "type": "number",
          "readOnly": true
        },
        "taxableIncome": {
          "type": "number",
          "readOnly": true
        },
        "federalIncomeTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "netEarnings"
      ]
    },
    "constants": {
      "seBase": 0.9235,
      "ssRate": 0.124,
      "medicareRate": 0.029,
      "ssWageBase": 184500,
      "qbiRate": 0.2,
      "standardDeduction": 16100,
      "b1": 12400,
      "b2": 50400,
      "b3": 105700,
      "b4": 201775,
      "b5": 256225,
      "b6": 640600,
      "r1": 0.1,
      "r2": 0.12,
      "r3": 0.22,
      "r4": 0.24,
      "r5": 0.32,
      "r6": 0.35,
      "r7": 0.37
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"netEarnings\": 100000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.seTaxBase",
        "expr": "$round(netEarnings * $const.seBase, 2)"
      },
      {
        "path": "$.selfEmploymentTax",
        "expr": "$round($const.ssRate * $min([seTaxBase, $const.ssWageBase]) + $const.medicareRate * seTaxBase, 2)"
      },
      {
        "path": "$.qbiDeduction",
        "expr": "$round($const.qbiRate * $max([0, netEarnings - selfEmploymentTax / 2]), 2)"
      },
      {
        "path": "$.taxableIncome",
        "expr": "$round($max([0, netEarnings - selfEmploymentTax / 2 - qbiDeduction - $const.standardDeduction]), 2)"
      },
      {
        "path": "$.federalIncomeTax",
        "expr": "($t := taxableIncome; $round($const.r1 * $min([$t, $const.b1]) + $const.r2 * $max([0, $min([$t, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$t, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$t, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $min([$t, $const.b5]) - $const.b4]) + $const.r6 * $max([0, $min([$t, $const.b6]) - $const.b5]) + $const.r7 * $max([0, $t - $const.b6]), 2))"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, netEarnings - selfEmploymentTax - federalIncomeTax]), 2)"
      }
    ],
    "constraints": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Self-employed net income",
          "layout": "vertical",
          "components": [
            {
              "id": "illustrativeNotice",
              "type": "alert",
              "variant": "warning",
              "label": "What this model leaves out",
              "text": "'Self-employment tax is the surprise for anyone leaving a salary: 15.3% covering BOTH halves of Social Security and Medicare, charged on 92.35% of net earnings, and it is due before a dollar of income tax. Half of it is deductible and that is applied, as is the 20% qualified business income deduction and the single standard deduction. What is left out matters: STATE and local income tax entirely, the 0.9% additional Medicare tax above the high-earner threshold, the taxable-income and specified-service limits on the QBI deduction, and any credits. Modelled for a single filer. Not tax advice.'"
            },
            {
              "id": "inputField",
              "type": "numericField",
              "label": "Annual net business earnings (USD)",
              "bind": "$.netEarnings",
              "placeholder": "100000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netIncomeTile",
                  "type": "statTile",
                  "label": "Net income / year (federal only)",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "selfEmploymentTaxTile",
                  "type": "statTile",
                  "label": "Self-employment tax",
                  "bind": "$.selfEmploymentTax",
                  "format": "number"
                },
                {
                  "id": "qbiDeductionTile",
                  "type": "statTile",
                  "label": "QBI deduction (20%)",
                  "bind": "$.qbiDeduction",
                  "format": "number"
                },
                {
                  "id": "federalIncomeTaxTile",
                  "type": "statTile",
                  "label": "Federal income tax",
                  "bind": "$.federalIncomeTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "IRS — Self-employment tax (Social Security and Medicare taxes)",
                  "url": "https://www.irs.gov/businesses/small-businesses-self-employed/self-employment-tax-social-security-and-medicare-taxes",
                  "date": "2026-08-22"
                },
                {
                  "label": "2026 federal income tax brackets and standard deduction (Rev. Proc. 2025-32)",
                  "url": "https://taxfoundation.org/data/all/federal/2026-tax-brackets/",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "100,000 USD net earnings — a typical full-time contractor",
        "given": {
          "$.netEarnings": 100000
        },
        "expect": {
          "$.seTaxBase": 92350,
          "$.selfEmploymentTax": 14129.55,
          "$.qbiDeduction": 18587.05,
          "$.taxableIncome": 58248.18,
          "$.federalIncomeTax": 7526.6,
          "$.netIncome": 78343.85
        }
      },
      {
        "description": "40,000 USD — part-time",
        "given": {
          "$.netEarnings": 40000
        },
        "expect": {
          "$.seTaxBase": 36940,
          "$.selfEmploymentTax": 5651.82,
          "$.qbiDeduction": 7434.82,
          "$.taxableIncome": 13639.27,
          "$.federalIncomeTax": 1388.71,
          "$.netIncome": 32959.47
        }
      },
      {
        "description": "250,000 USD — above the Social Security wage base",
        "given": {
          "$.netEarnings": 250000
        },
        "expect": {
          "$.seTaxBase": 230875,
          "$.selfEmploymentTax": 29573.38,
          "$.qbiDeduction": 47042.66,
          "$.taxableIncome": 172070.65,
          "$.federalIncomeTax": 33894.96,
          "$.netIncome": 186531.66
        }
      }
    ]
  }
}
