{
  "$comment": "Machine-readable companion to https://valem.run/calculators/denmark/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/denmark/self-employed",
  "dataUrl": "https://valem.run/calculators/denmark/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Denmark selvstændig model by Valem (https://valem.run/calculators/denmark/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/denmark/self-employed/verify",
  "country": "denmark",
  "countryName": "Denmark",
  "formula": "self-employed",
  "formulaName": "Selvstændig",
  "title": "Selvstændig Skat — Denmark Freelancer Tax",
  "answer": "Your net income as a Danish selvstændig is surplus minus the 8% AM-bidrag, then roughly 34% combined bottom, municipal and health tax on what remains after the personal allowance, plus the 2026 intermediate, top and top-top brackets.",
  "lang": "en",
  "currency": "DKK",
  "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": "Skattestyrelsen — AM-bidrag (labour market contribution)",
      "url": "https://skat.dk/en-us/individuals/labour-market-contribution",
      "checked": "2026-08-22"
    },
    {
      "label": "Nye skattegrænser 2026: mellemskat, topskat og top-topskat",
      "url": "https://www.nordea.com/da/nyhed/nye-skattegraenser-og-fradragssatser-danskerne-faar-flere-penge-mellem-haenderne",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "annualSurplus",
      "type": "number",
      "label": "Annual surplus (DKK)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "amBidrag",
      "type": "number",
      "label": "AM-bidrag (8%)",
      "format": "number",
      "formula": "$round(annualSurplus * $const.amRate, 2)"
    },
    {
      "name": "afterAmBidrag",
      "type": "number",
      "formula": "$round(annualSurplus - amBidrag, 2)"
    },
    {
      "name": "baseTax",
      "type": "number",
      "label": "Bottom + municipal + health tax",
      "format": "number",
      "formula": "$round($const.baseRate * $max([0, afterAmBidrag - $const.personalAllowance]), 2)"
    },
    {
      "name": "bracketTax",
      "type": "number",
      "label": "Intermediate / top / top-top tax",
      "format": "number",
      "formula": "($a := afterAmBidrag; $round($const.mellemRate * $max([0, $min([$a, $const.topStart]) - $const.mellemStart]) + $const.topRate * $max([0, $min([$a, $const.topTopStart]) - $const.topStart]) + $const.topTopRate * $max([0, $a - $const.topTopStart]), 2))"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round($max([0, annualSurplus - amBidrag - baseTax - bracketTax]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "600,000 DKK surplus — a typical full-time freelancer",
      "given": {
        "annualSurplus": 600000
      },
      "expect": {
        "amBidrag": 48000,
        "afterAmBidrag": 552000,
        "baseTax": 169286,
        "bracketTax": 0,
        "netIncome": 382714
      }
    },
    {
      "description": "250,000 DKK — part-time",
      "given": {
        "annualSurplus": 250000
      },
      "expect": {
        "amBidrag": 20000,
        "afterAmBidrag": 230000,
        "baseTax": 59806,
        "bracketTax": 0,
        "netIncome": 170194
      }
    },
    {
      "description": "1,200,000 DKK — into the top bracket",
      "given": {
        "annualSurplus": 1200000
      },
      "expect": {
        "amBidrag": 96000,
        "afterAmBidrag": 1104000,
        "baseTax": 356966,
        "bracketTax": 34710,
        "netIncome": 712324
      }
    }
  ],
  "spec": {
    "id": "self-employed-denmark",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualSurplus": {
          "type": "number",
          "minimum": 0
        },
        "amBidrag": {
          "type": "number",
          "readOnly": true
        },
        "afterAmBidrag": {
          "type": "number",
          "readOnly": true
        },
        "baseTax": {
          "type": "number",
          "readOnly": true
        },
        "bracketTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "annualSurplus"
      ]
    },
    "constants": {
      "amRate": 0.08,
      "personalAllowance": 54100,
      "baseRate": 0.34,
      "mellemStart": 641200,
      "topStart": 777900,
      "topTopStart": 2592700,
      "mellemRate": 0.075,
      "topRate": 0.075,
      "topTopRate": 0.05
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualSurplus\": 600000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.amBidrag",
        "expr": "$round(annualSurplus * $const.amRate, 2)"
      },
      {
        "path": "$.afterAmBidrag",
        "expr": "$round(annualSurplus - amBidrag, 2)"
      },
      {
        "path": "$.baseTax",
        "expr": "$round($const.baseRate * $max([0, afterAmBidrag - $const.personalAllowance]), 2)"
      },
      {
        "path": "$.bracketTax",
        "expr": "($a := afterAmBidrag; $round($const.mellemRate * $max([0, $min([$a, $const.topStart]) - $const.mellemStart]) + $const.topRate * $max([0, $min([$a, $const.topTopStart]) - $const.topStart]) + $const.topTopRate * $max([0, $a - $const.topTopStart]), 2))"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, annualSurplus - amBidrag - baseTax - bracketTax]), 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": "'2026 replaced the old 15% topskat with three brackets — an intermediate 7.5%, a new topskat of 7.5% and a top-top of 5% — all charged on income after AM-bidrag, and this model implements that structure. The 34% is bundskat, kommuneskat and sundhedsbidrag added together at a representative municipality; the municipal component varies by kommune, so the real combined rate differs by a couple of points either way. The employment allowance (beskæftigelsesfradrag), the virksomhedsordning and any AMBI or deductible pension contributions are not modelled. Not tax advice.'"
            },
            {
              "id": "inputField",
              "type": "numericField",
              "label": "Annual surplus (DKK)",
              "bind": "$.annualSurplus",
              "placeholder": "600000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netIncomeTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "amBidragTile",
                  "type": "statTile",
                  "label": "AM-bidrag (8%)",
                  "bind": "$.amBidrag",
                  "format": "number"
                },
                {
                  "id": "baseTaxTile",
                  "type": "statTile",
                  "label": "Bottom + municipal + health tax",
                  "bind": "$.baseTax",
                  "format": "number"
                },
                {
                  "id": "bracketTaxTile",
                  "type": "statTile",
                  "label": "Intermediate / top / top-top tax",
                  "bind": "$.bracketTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Skattestyrelsen — AM-bidrag (labour market contribution)",
                  "url": "https://skat.dk/en-us/individuals/labour-market-contribution",
                  "date": "2026-08-22"
                },
                {
                  "label": "Nye skattegrænser 2026: mellemskat, topskat og top-topskat",
                  "url": "https://www.nordea.com/da/nyhed/nye-skattegraenser-og-fradragssatser-danskerne-faar-flere-penge-mellem-haenderne",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "600,000 DKK surplus — a typical full-time freelancer",
        "given": {
          "$.annualSurplus": 600000
        },
        "expect": {
          "$.amBidrag": 48000,
          "$.afterAmBidrag": 552000,
          "$.baseTax": 169286,
          "$.bracketTax": 0,
          "$.netIncome": 382714
        }
      },
      {
        "description": "250,000 DKK — part-time",
        "given": {
          "$.annualSurplus": 250000
        },
        "expect": {
          "$.amBidrag": 20000,
          "$.afterAmBidrag": 230000,
          "$.baseTax": 59806,
          "$.bracketTax": 0,
          "$.netIncome": 170194
        }
      },
      {
        "description": "1,200,000 DKK — into the top bracket",
        "given": {
          "$.annualSurplus": 1200000
        },
        "expect": {
          "$.amBidrag": 96000,
          "$.afterAmBidrag": 1104000,
          "$.baseTax": 356966,
          "$.bracketTax": 34710,
          "$.netIncome": 712324
        }
      }
    ]
  }
}
