{
  "$comment": "Machine-readable companion to https://valem.run/calculators/sweden/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/sweden/self-employed",
  "dataUrl": "https://valem.run/calculators/sweden/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Sweden enskild firma model by Valem (https://valem.run/calculators/sweden/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/sweden/self-employed/verify",
  "country": "sweden",
  "countryName": "Sweden",
  "formula": "self-employed",
  "formulaName": "Enskild firma",
  "title": "Enskild Firma Skatt — Sweden Freelancer",
  "answer": "Your net income from a Swedish enskild firma is the surplus minus a 25% standard deduction, then egenavgifter at 28.97% and municipal tax on what remains, plus 20% state tax above the threshold.",
  "lang": "en",
  "currency": "SEK",
  "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": "Skatteverket — Egenavgifter och särskild löneskatt",
      "url": "https://www.skatteverket.se/foretag/drivaforetag/foretagsformer/enskildnaringsverksamhet/egenavgifterochsarskildloneskatt.4.361dc8c15312eff6fd1f678.html",
      "checked": "2026-08-22"
    },
    {
      "label": "Belopp och procentsatser för företagare 2026",
      "url": "https://www.fortnox.se/fortnox-foretagsguide/driva-foretag/skatt/belopp-och-procentsatser",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "annualSurplus",
      "type": "number",
      "label": "Annual surplus before contributions (SEK)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "schablonavdrag",
      "type": "number",
      "formula": "$round(annualSurplus * $const.schablonRate, 2)"
    },
    {
      "name": "taxableIncome",
      "type": "number",
      "formula": "$round($max([0, annualSurplus - schablonavdrag]), 2)"
    },
    {
      "name": "egenavgifter",
      "type": "number",
      "label": "Egenavgifter (28.97%)",
      "format": "number",
      "formula": "$round(taxableIncome * $const.egenavgifterRate, 2)"
    },
    {
      "name": "municipalTax",
      "type": "number",
      "label": "Municipal tax",
      "format": "number",
      "formula": "$round(taxableIncome * $const.municipalRate, 2)"
    },
    {
      "name": "stateTax",
      "type": "number",
      "label": "State tax (20%)",
      "format": "number",
      "formula": "$round($const.stateRate * $max([0, taxableIncome - $const.stateThreshold]), 2)"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round($max([0, annualSurplus - egenavgifter - municipalTax - stateTax]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "600,000 SEK surplus — a typical full-time sole trader",
      "given": {
        "annualSurplus": 600000
      },
      "expect": {
        "schablonavdrag": 150000,
        "taxableIncome": 450000,
        "egenavgifter": 130365,
        "municipalTax": 145845,
        "stateTax": 0,
        "netIncome": 323790
      }
    },
    {
      "description": "250,000 SEK — part-time",
      "given": {
        "annualSurplus": 250000
      },
      "expect": {
        "schablonavdrag": 62500,
        "taxableIncome": 187500,
        "egenavgifter": 54318.75,
        "municipalTax": 60768.75,
        "stateTax": 0,
        "netIncome": 134912.5
      }
    },
    {
      "description": "1,200,000 SEK — above the state tax threshold",
      "given": {
        "annualSurplus": 1200000
      },
      "expect": {
        "schablonavdrag": 300000,
        "taxableIncome": 900000,
        "egenavgifter": 260730,
        "municipalTax": 291690,
        "stateTax": 47920,
        "netIncome": 599660
      }
    }
  ],
  "spec": {
    "id": "self-employed-sweden",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualSurplus": {
          "type": "number",
          "minimum": 0
        },
        "schablonavdrag": {
          "type": "number",
          "readOnly": true
        },
        "taxableIncome": {
          "type": "number",
          "readOnly": true
        },
        "egenavgifter": {
          "type": "number",
          "readOnly": true
        },
        "municipalTax": {
          "type": "number",
          "readOnly": true
        },
        "stateTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "annualSurplus"
      ]
    },
    "constants": {
      "schablonRate": 0.25,
      "egenavgifterRate": 0.2897,
      "municipalRate": 0.3241,
      "stateThreshold": 660400,
      "stateRate": 0.2
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualSurplus\": 600000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.schablonavdrag",
        "expr": "$round(annualSurplus * $const.schablonRate, 2)"
      },
      {
        "path": "$.taxableIncome",
        "expr": "$round($max([0, annualSurplus - schablonavdrag]), 2)"
      },
      {
        "path": "$.egenavgifter",
        "expr": "$round(taxableIncome * $const.egenavgifterRate, 2)"
      },
      {
        "path": "$.municipalTax",
        "expr": "$round(taxableIncome * $const.municipalRate, 2)"
      },
      {
        "path": "$.stateTax",
        "expr": "$round($const.stateRate * $max([0, taxableIncome - $const.stateThreshold]), 2)"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, annualSurplus - egenavgifter - municipalTax - stateTax]), 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": "'The schablonavdrag is the mechanism worth knowing: you deduct a standard 25% of the surplus to cover the egenavgifter you have not yet paid, and both the contributions and the income tax are then computed on what is left — which is why the effective burden is lower than adding 28.97% and the tax rate together would suggest. Municipal tax is the income-weighted national average here; actual rates run roughly 29% to 35% depending on kommun, so this figure moves by thousands with where you live. The grundavdrag, which reduces taxable income on a sliding scale, and the jobbskatteavdrag are not modelled. Not tax advice.'"
            },
            {
              "id": "inputField",
              "type": "numericField",
              "label": "Annual surplus before contributions (SEK)",
              "bind": "$.annualSurplus",
              "placeholder": "600000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netIncomeTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "egenavgifterTile",
                  "type": "statTile",
                  "label": "Egenavgifter (28.97%)",
                  "bind": "$.egenavgifter",
                  "format": "number"
                },
                {
                  "id": "municipalTaxTile",
                  "type": "statTile",
                  "label": "Municipal tax",
                  "bind": "$.municipalTax",
                  "format": "number"
                },
                {
                  "id": "stateTaxTile",
                  "type": "statTile",
                  "label": "State tax (20%)",
                  "bind": "$.stateTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Skatteverket — Egenavgifter och särskild löneskatt",
                  "url": "https://www.skatteverket.se/foretag/drivaforetag/foretagsformer/enskildnaringsverksamhet/egenavgifterochsarskildloneskatt.4.361dc8c15312eff6fd1f678.html",
                  "date": "2026-08-22"
                },
                {
                  "label": "Belopp och procentsatser för företagare 2026",
                  "url": "https://www.fortnox.se/fortnox-foretagsguide/driva-foretag/skatt/belopp-och-procentsatser",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "600,000 SEK surplus — a typical full-time sole trader",
        "given": {
          "$.annualSurplus": 600000
        },
        "expect": {
          "$.schablonavdrag": 150000,
          "$.taxableIncome": 450000,
          "$.egenavgifter": 130365,
          "$.municipalTax": 145845,
          "$.stateTax": 0,
          "$.netIncome": 323790
        }
      },
      {
        "description": "250,000 SEK — part-time",
        "given": {
          "$.annualSurplus": 250000
        },
        "expect": {
          "$.schablonavdrag": 62500,
          "$.taxableIncome": 187500,
          "$.egenavgifter": 54318.75,
          "$.municipalTax": 60768.75,
          "$.stateTax": 0,
          "$.netIncome": 134912.5
        }
      },
      {
        "description": "1,200,000 SEK — above the state tax threshold",
        "given": {
          "$.annualSurplus": 1200000
        },
        "expect": {
          "$.schablonavdrag": 300000,
          "$.taxableIncome": 900000,
          "$.egenavgifter": 260730,
          "$.municipalTax": 291690,
          "$.stateTax": 47920,
          "$.netIncome": 599660
        }
      }
    ]
  }
}
