{
  "$comment": "Machine-readable companion to https://valem.run/calculators/south-africa/net-salary. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/south-africa/net-salary",
  "dataUrl": "https://valem.run/calculators/south-africa/net-salary.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "South Africa salary after tax model by Valem (https://valem.run/calculators/south-africa/net-salary), 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/south-africa/net-salary/verify",
  "country": "south-africa",
  "countryName": "South Africa",
  "formula": "net-salary",
  "formulaName": "Salary after tax",
  "title": "Salary Calculator After Tax — South Africa",
  "answer": "Your South African net salary is gross minus PAYE (18-45% less the primary rebate) and UIF.",
  "lang": "en",
  "currency": "ZAR",
  "taxYear": "2026-27",
  "verification": {
    "claim": "internal-consistency",
    "statement": "The Valem engine reproduces this model's stated formula through 2 self-test cases (below, and re-runnable against the spec). That asserts internal consistency, NOT that the formula matches current law — the cited sources are the evidence for that, and carry the date each was last checked.",
    "selfTestCases": 2,
    "ratesAreIllustrative": false,
    "sourcesCheckedOn": "2026-08-02"
  },
  "sources": [
    {
      "label": "SARS — tax tables",
      "url": "https://www.sars.gov.za",
      "checked": "2026-08-02"
    }
  ],
  "terminalOutput": "netMonthly",
  "inputs": [
    {
      "name": "grossAnnual",
      "type": "number",
      "label": "Gross annual salary (ZAR)",
      "format": "currency",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "payeGross",
      "type": "number",
      "formula": "($t := grossAnnual; $round((($t < 245100 ? $t : 245100) * 0.18) + (($t > 245100 ? (($t < 383100 ? $t : 383100) - 245100) : 0) * 0.26) + (($t > 383100 ? (($t < 530200 ? $t : 530200) - 383100) : 0) * 0.31) + (($t > 530200 ? (($t < 695800 ? $t : 695800) - 530200) : 0) * 0.36) + (($t > 695800 ? (($t < 887000 ? $t : 887000) - 695800) : 0) * 0.39) + (($t > 887000 ? (($t < 1878600 ? $t : 1878600) - 887000) : 0) * 0.41) + (($t > 1878600 ? ($t - 1878600) : 0) * 0.45), 2))"
    },
    {
      "name": "paye",
      "type": "number",
      "label": "PAYE (after rebate)",
      "format": "currency",
      "formula": "($p := payeGross - $const.primaryRebate; $round($p > 0 ? $p : 0, 2))"
    },
    {
      "name": "uif",
      "type": "number",
      "label": "UIF",
      "format": "currency",
      "formula": "$round((grossAnnual < $const.uifCeiling ? grossAnnual : $const.uifCeiling) * $const.uifRate, 2)"
    },
    {
      "name": "netAnnual",
      "type": "number",
      "label": "Net / year",
      "format": "currency",
      "formula": "$round(grossAnnual - paye - uif, 2)"
    },
    {
      "name": "netMonthly",
      "type": "number",
      "label": "Net / month",
      "format": "currency",
      "formula": "$round(netAnnual / 12, 2)"
    }
  ],
  "testCases": [
    {
      "description": "S1 360,000 ZAR single",
      "given": {
        "grossAnnual": 360000
      },
      "expect": {
        "paye": 56172,
        "uif": 2125.44,
        "netAnnual": 301702.56
      }
    },
    {
      "description": "S3 900,000 ZAR",
      "given": {
        "grossAnnual": 900000
      },
      "expect": {
        "paye": 247293,
        "netAnnual": 650581.56
      }
    }
  ],
  "spec": {
    "id": "net-salary-south-africa",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "grossAnnual": {
          "type": "number",
          "minimum": 0
        },
        "payeGross": {
          "type": "number",
          "readOnly": true
        },
        "paye": {
          "type": "number",
          "readOnly": true
        },
        "uif": {
          "type": "number",
          "readOnly": true
        },
        "netAnnual": {
          "type": "number",
          "readOnly": true
        },
        "netMonthly": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {
      "primaryRebate": 17820,
      "uifRate": 0.01,
      "uifCeiling": 212544
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ 'grossAnnual': 360000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.payeGross",
        "expr": "($t := grossAnnual; $round((($t < 245100 ? $t : 245100) * 0.18) + (($t > 245100 ? (($t < 383100 ? $t : 383100) - 245100) : 0) * 0.26) + (($t > 383100 ? (($t < 530200 ? $t : 530200) - 383100) : 0) * 0.31) + (($t > 530200 ? (($t < 695800 ? $t : 695800) - 530200) : 0) * 0.36) + (($t > 695800 ? (($t < 887000 ? $t : 887000) - 695800) : 0) * 0.39) + (($t > 887000 ? (($t < 1878600 ? $t : 1878600) - 887000) : 0) * 0.41) + (($t > 1878600 ? ($t - 1878600) : 0) * 0.45), 2))"
      },
      {
        "path": "$.paye",
        "expr": "($p := payeGross - $const.primaryRebate; $round($p > 0 ? $p : 0, 2))"
      },
      {
        "path": "$.uif",
        "expr": "$round((grossAnnual < $const.uifCeiling ? grossAnnual : $const.uifCeiling) * $const.uifRate, 2)"
      },
      {
        "path": "$.netAnnual",
        "expr": "$round(grossAnnual - paye - uif, 2)"
      },
      {
        "path": "$.netMonthly",
        "expr": "$round(netAnnual / 12, 2)"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Salary after tax",
          "layout": "vertical",
          "components": [
            {
              "id": "gross",
              "type": "numericField",
              "label": "Gross annual salary (ZAR)",
              "bind": "$.grossAnnual"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netM",
                  "type": "statTile",
                  "label": "Net / month",
                  "bind": "$.netMonthly",
                  "format": "currency",
                  "currency": "ZAR"
                },
                {
                  "id": "netY",
                  "type": "statTile",
                  "label": "Net / year",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "ZAR"
                }
              ]
            },
            {
              "id": "breakdown",
              "type": "keyValueList",
              "label": "Annual breakdown",
              "items": [
                {
                  "label": "Gross",
                  "bind": "$.grossAnnual",
                  "format": "currency",
                  "currency": "ZAR"
                },
                {
                  "label": "PAYE (after rebate)",
                  "bind": "$.paye",
                  "format": "currency",
                  "currency": "ZAR"
                },
                {
                  "label": "UIF",
                  "bind": "$.uif",
                  "format": "currency",
                  "currency": "ZAR"
                },
                {
                  "label": "Net",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "ZAR"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'South Africa 2026-27: PAYE on the annual table (18-45%) less the primary rebate, plus UIF 1% on a capped base. Medical-scheme credits are an optional add-on. Estimate, not tax advice.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "SARS — tax tables",
                  "url": "https://www.sars.gov.za",
                  "date": "2026-08-02"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "S1 360,000 ZAR single",
        "given": {
          "$.grossAnnual": 360000
        },
        "expect": {
          "$.paye": 56172,
          "$.uif": 2125.44,
          "$.netAnnual": 301702.56
        }
      },
      {
        "description": "S3 900,000 ZAR",
        "given": {
          "$.grossAnnual": 900000
        },
        "expect": {
          "$.paye": 247293,
          "$.netAnnual": 650581.56
        }
      }
    ]
  }
}
