{
  "$comment": "Machine-readable companion to https://valem.run/calculators/sweden/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/sweden/net-salary",
  "dataUrl": "https://valem.run/calculators/sweden/net-salary.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Sweden lön efter skatt model by Valem (https://valem.run/calculators/sweden/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/sweden/net-salary/verify",
  "country": "sweden",
  "countryName": "Sweden",
  "formula": "net-salary",
  "formulaName": "Lön efter skatt",
  "title": "Räkna ut Lön Efter Skatt — Sweden",
  "answer": "Your Swedish net salary is gross minus municipal tax (after the basic allowance and job tax credit) and state tax above the threshold.",
  "lang": "en",
  "currency": "SEK",
  "taxYear": "2026",
  "verification": {
    "claim": "internal-consistency",
    "statement": "The Valem engine reproduces this model's stated formula through 3 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": 3,
    "ratesAreIllustrative": false,
    "sourcesCheckedOn": "2026-08-02"
  },
  "sources": [
    {
      "label": "Skatteverket",
      "url": "https://www.skatteverket.se",
      "checked": "2026-08-02"
    }
  ],
  "terminalOutput": "netMonthly",
  "inputs": [
    {
      "name": "grossAnnual",
      "type": "number",
      "label": "Bruttolön / år (SEK)",
      "format": "currency",
      "minimum": 0
    },
    {
      "name": "kommun",
      "type": "string",
      "label": "Kommun"
    },
    {
      "name": "customMunicipalRate",
      "type": "number",
      "label": "Kommunalskatt om « Annan » (t.ex. 0.3241)",
      "minimum": 0,
      "maximum": 1
    }
  ],
  "outputs": [
    {
      "name": "municipalRate",
      "type": "number",
      "label": "Kommunalskatt",
      "formula": "($s := kommun; $s = 'genomsnitt' ? $const.rateGenomsnitt : $s = 'stockholm' ? $const.rateStockholm : $s = 'goteborg' ? $const.rateGoteborg : $s = 'malmo' ? $const.rateMalmo : $s = 'osteraker' ? $const.rateOsteraker : $s = 'dorotea' ? $const.rateDorotea : customMunicipalRate)"
    },
    {
      "name": "taxable",
      "type": "number",
      "label": "Beskattningsbar",
      "format": "currency",
      "formula": "($b := grossAnnual - $const.grundavdrag; $round($b > 0 ? $b : 0, 2))"
    },
    {
      "name": "municipalTax",
      "type": "number",
      "label": "Kommunalskatt",
      "format": "currency",
      "formula": "$round(taxable * municipalRate, 2)"
    },
    {
      "name": "jobbskatteavdrag",
      "type": "number",
      "label": "Jobbskatteavdrag",
      "format": "currency",
      "formula": "($j := taxable * 0.09; $round($j < $const.jobbCap ? $j : $const.jobbCap, 2))"
    },
    {
      "name": "stateTax",
      "type": "number",
      "label": "Statlig skatt",
      "format": "currency",
      "formula": "$round(grossAnnual > $const.stateThreshold ? (grossAnnual - $const.stateThreshold) * $const.stateRate : 0, 2)"
    },
    {
      "name": "netAnnual",
      "type": "number",
      "label": "Netto / år",
      "format": "currency",
      "formula": "$round(grossAnnual - (municipalTax - jobbskatteavdrag) - stateTax, 2)"
    },
    {
      "name": "netMonthly",
      "type": "number",
      "label": "Netto / månad",
      "format": "currency",
      "formula": "$round(netAnnual / 12, 2)"
    }
  ],
  "testCases": [
    {
      "description": "S1 420,000 SEK, average kommun",
      "given": {
        "grossAnnual": 420000,
        "kommun": "annan",
        "customMunicipalRate": 0.3241
      },
      "expect": {
        "taxable": 395700,
        "municipalTax": 128246.37,
        "jobbskatteavdrag": 35613
      }
    },
    {
      "description": "S2 700,000 SEK — state tax binds",
      "given": {
        "grossAnnual": 700000,
        "kommun": "annan",
        "customMunicipalRate": 0.3241
      },
      "expect": {
        "taxable": 675700,
        "jobbskatteavdrag": 46200,
        "stateTax": 7920
      }
    },
    {
      "description": "S3 420.000 kr i Stockholm — lägre kommunalskatt än riksgenomsnittet",
      "given": {
        "grossAnnual": 420000,
        "kommun": "stockholm"
      },
      "expect": {
        "municipalRate": 0.304,
        "municipalTax": 120292.8
      }
    }
  ],
  "spec": {
    "id": "net-salary-sweden",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "grossAnnual": {
          "type": "number",
          "minimum": 0
        },
        "kommun": {
          "type": "string"
        },
        "customMunicipalRate": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "municipalRate": {
          "type": "number",
          "readOnly": true
        },
        "taxable": {
          "type": "number",
          "readOnly": true
        },
        "municipalTax": {
          "type": "number",
          "readOnly": true
        },
        "jobbskatteavdrag": {
          "type": "number",
          "readOnly": true
        },
        "stateTax": {
          "type": "number",
          "readOnly": true
        },
        "netAnnual": {
          "type": "number",
          "readOnly": true
        },
        "netMonthly": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {
      "grundavdrag": 24300,
      "stateThreshold": 660400,
      "stateRate": 0.2,
      "jobbCap": 46200,
      "rateGenomsnitt": 0.3238,
      "rateStockholm": 0.304,
      "rateGoteborg": 0.326,
      "rateMalmo": 0.324,
      "rateOsteraker": 0.2893,
      "rateDorotea": 0.3565
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{'grossAnnual': 420000, 'kommun': 'genomsnitt', 'customMunicipalRate': 0.3241}"
      }
    ],
    "derivations": [
      {
        "path": "$.municipalRate",
        "expr": "($s := kommun; $s = 'genomsnitt' ? $const.rateGenomsnitt : $s = 'stockholm' ? $const.rateStockholm : $s = 'goteborg' ? $const.rateGoteborg : $s = 'malmo' ? $const.rateMalmo : $s = 'osteraker' ? $const.rateOsteraker : $s = 'dorotea' ? $const.rateDorotea : customMunicipalRate)"
      },
      {
        "path": "$.taxable",
        "expr": "($b := grossAnnual - $const.grundavdrag; $round($b > 0 ? $b : 0, 2))"
      },
      {
        "path": "$.municipalTax",
        "expr": "$round(taxable * municipalRate, 2)"
      },
      {
        "path": "$.jobbskatteavdrag",
        "expr": "($j := taxable * 0.09; $round($j < $const.jobbCap ? $j : $const.jobbCap, 2))"
      },
      {
        "path": "$.stateTax",
        "expr": "$round(grossAnnual > $const.stateThreshold ? (grossAnnual - $const.stateThreshold) * $const.stateRate : 0, 2)"
      },
      {
        "path": "$.netAnnual",
        "expr": "$round(grossAnnual - (municipalTax - jobbskatteavdrag) - stateTax, 2)"
      },
      {
        "path": "$.netMonthly",
        "expr": "$round(netAnnual / 12, 2)"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Lön efter skatt",
          "layout": "vertical",
          "components": [
            {
              "id": "gross",
              "type": "numericField",
              "label": "Bruttolön / år (SEK)",
              "bind": "$.grossAnnual"
            },
            {
              "id": "kommun",
              "type": "selectField",
              "label": "Kommun",
              "bind": "$.kommun",
              "helperText": "Kommunalskatten sätts av din kommun. Välj en, eller ange din egen skattesats.",
              "options": [
                {
                  "value": "genomsnitt",
                  "label": "Riksgenomsnitt — 32,38 %"
                },
                {
                  "value": "stockholm",
                  "label": "Stockholm — 30,40 %"
                },
                {
                  "value": "goteborg",
                  "label": "Göteborg — 32,60 %"
                },
                {
                  "value": "malmo",
                  "label": "Malmö — 32,40 %"
                },
                {
                  "value": "osteraker",
                  "label": "Österåker — 28,93 % (lägst i landet)"
                },
                {
                  "value": "dorotea",
                  "label": "Dorotea — 35,65 % (högst i landet)"
                },
                {
                  "value": "annan",
                  "label": "Annan kommun — ange själv"
                }
              ]
            },
            {
              "id": "muni",
              "type": "numericField",
              "label": "Kommunalskatt om « Annan » (t.ex. 0.3241)",
              "bind": "$.customMunicipalRate"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netM",
                  "type": "statTile",
                  "label": "Netto / månad",
                  "bind": "$.netMonthly",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "id": "netY",
                  "type": "statTile",
                  "label": "Netto / år",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "SEK"
                }
              ]
            },
            {
              "id": "breakdown",
              "type": "keyValueList",
              "label": "Beräkning",
              "items": [
                {
                  "label": "Kommunalskatt",
                  "bind": "$.municipalRate"
                },
                {
                  "label": "Brutto",
                  "bind": "$.grossAnnual",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "label": "Beskattningsbar",
                  "bind": "$.taxable",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "label": "Kommunalskatt",
                  "bind": "$.municipalTax",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "label": "Jobbskatteavdrag",
                  "bind": "$.jobbskatteavdrag",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "label": "Statlig skatt",
                  "bind": "$.stateTax",
                  "format": "currency",
                  "currency": "SEK"
                },
                {
                  "label": "Netto",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "SEK"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'Sverige 2026 (förenklat): grundavdrag, kommunalskatt, jobbskatteavdrag och statlig skatt 20% över brytpunkten. Uppskattning, inte skatterådgivning. Kommunalskatten 2026 spänner från 28,93 % (Österåker) till 35,65 % (Dorotea), med ett riksgenomsnitt på 32,38 %.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Källor",
              "items": [
                {
                  "label": "Skatteverket",
                  "url": "https://www.skatteverket.se",
                  "date": "2026-08-02"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "S1 420,000 SEK, average kommun",
        "given": {
          "$.grossAnnual": 420000,
          "$.kommun": "annan",
          "$.customMunicipalRate": 0.3241
        },
        "expect": {
          "$.taxable": 395700,
          "$.municipalTax": 128246.37,
          "$.jobbskatteavdrag": 35613
        }
      },
      {
        "description": "S2 700,000 SEK — state tax binds",
        "given": {
          "$.grossAnnual": 700000,
          "$.kommun": "annan",
          "$.customMunicipalRate": 0.3241
        },
        "expect": {
          "$.taxable": 675700,
          "$.jobbskatteavdrag": 46200,
          "$.stateTax": 7920
        }
      },
      {
        "description": "S3 420.000 kr i Stockholm — lägre kommunalskatt än riksgenomsnittet",
        "given": {
          "$.grossAnnual": 420000,
          "$.kommun": "stockholm"
        },
        "expect": {
          "$.municipalRate": 0.304,
          "$.municipalTax": 120292.8
        }
      }
    ]
  }
}
