{
  "$comment": "Machine-readable companion to https://valem.run/calculators/denmark/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/denmark/net-salary",
  "dataUrl": "https://valem.run/calculators/denmark/net-salary.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Denmark løn efter skat model by Valem (https://valem.run/calculators/denmark/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/denmark/net-salary/verify",
  "country": "denmark",
  "countryName": "Denmark",
  "formula": "net-salary",
  "formulaName": "Løn efter skat",
  "title": "Beregn Løn Efter Skat — Denmark net salary",
  "answer": "Your Danish net pay is gross minus the 8% labour-market contribution and income tax (bottom, municipal, middle and top), after the personal allowance.",
  "lang": "en",
  "currency": "DKK",
  "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": "Skattestyrelsen",
      "url": "https://skat.dk",
      "checked": "2026-08-02"
    }
  ],
  "terminalOutput": "netMonthly",
  "inputs": [
    {
      "name": "grossAnnual",
      "type": "number",
      "label": "Bruttoløn / år (DKK)",
      "format": "currency",
      "minimum": 0
    },
    {
      "name": "kommune",
      "type": "string",
      "label": "Kommune"
    },
    {
      "name": "customMunicipalRate",
      "type": "number",
      "label": "Kommuneskat hvis « Anden » (f.eks. 0.251)",
      "minimum": 0,
      "maximum": 1
    }
  ],
  "outputs": [
    {
      "name": "municipalRate",
      "type": "number",
      "label": "Kommuneskat",
      "formula": "($s := kommune; $s = 'gennemsnit' ? $const.rateGennemsnit : $s = 'koebenhavn' ? $const.rateKoebenhavn : $s = 'hoejeste' ? $const.rateHoejeste : customMunicipalRate)"
    },
    {
      "name": "atp",
      "type": "number",
      "formula": "$round(grossAnnual > 0 ? $const.atpAnnual : 0, 2)"
    },
    {
      "name": "amBidrag",
      "type": "number",
      "label": "AM-bidrag (8%)",
      "format": "currency",
      "formula": "($b := grossAnnual - atp; $round(($b > 0 ? $b : 0) * $const.amRate, 2))"
    },
    {
      "name": "afterAm",
      "type": "number",
      "formula": "($a := grossAnnual - amBidrag - atp; $round($a > 0 ? $a : 0, 2))"
    },
    {
      "name": "taxable",
      "type": "number",
      "label": "Skattepligtig",
      "format": "currency",
      "formula": "($b := afterAm - $const.personalAllowance; $round($b > 0 ? $b : 0, 2))"
    },
    {
      "name": "bottomMunicipal",
      "type": "number",
      "label": "Bund + kommuneskat",
      "format": "currency",
      "formula": "$round(taxable * ($const.bottomRate + municipalRate), 2)"
    },
    {
      "name": "mellemTax",
      "type": "number",
      "label": "Mellemskat",
      "format": "currency",
      "formula": "$round(afterAm > $const.mellemThreshold ? (afterAm - $const.mellemThreshold) * $const.mellemRate : 0, 2)"
    },
    {
      "name": "topTax",
      "type": "number",
      "label": "Topskat",
      "format": "currency",
      "formula": "$round(afterAm > $const.topThreshold ? (afterAm - $const.topThreshold) * $const.topRate : 0, 2)"
    },
    {
      "name": "topTopTax",
      "type": "number",
      "formula": "$round(grossAnnual > $const.topTopThreshold ? (grossAnnual - $const.topTopThreshold) * $const.topTopRate : 0, 2)"
    },
    {
      "name": "netAnnual",
      "type": "number",
      "label": "Netto / år",
      "format": "currency",
      "formula": "$round(grossAnnual - amBidrag - atp - bottomMunicipal - mellemTax - topTax - topTopTax, 2)"
    },
    {
      "name": "netMonthly",
      "type": "number",
      "label": "Netto / måned",
      "format": "currency",
      "formula": "$round(netAnnual / 12, 2)"
    }
  ],
  "testCases": [
    {
      "description": "S1 420,000 DKK, average municipality",
      "given": {
        "grossAnnual": 420000,
        "kommune": "anden",
        "customMunicipalRate": 0.251
      },
      "expect": {
        "atp": 1188,
        "amBidrag": 33504.96,
        "afterAm": 385307.04,
        "taxable": 331207.04
      }
    },
    {
      "description": "S3 900,000 DKK — mellemskat and topskat both bind",
      "given": {
        "grossAnnual": 900000,
        "kommune": "anden",
        "customMunicipalRate": 0.251
      },
      "expect": {
        "amBidrag": 71904.96,
        "afterAm": 826907.04,
        "mellemTax": 13928.03,
        "topTax": 3675.53
      }
    },
    {
      "description": "S2 420.000 kr. i København — landets laveste kommuneskat",
      "given": {
        "grossAnnual": 420000,
        "kommune": "koebenhavn"
      },
      "expect": {
        "municipalRate": 0.2339,
        "bottomMunicipal": 117247.29
      }
    }
  ],
  "spec": {
    "id": "net-salary-denmark",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "grossAnnual": {
          "type": "number",
          "minimum": 0
        },
        "kommune": {
          "type": "string"
        },
        "customMunicipalRate": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "municipalRate": {
          "type": "number",
          "readOnly": true
        },
        "atp": {
          "type": "number",
          "readOnly": true
        },
        "amBidrag": {
          "type": "number",
          "readOnly": true
        },
        "afterAm": {
          "type": "number",
          "readOnly": true
        },
        "taxable": {
          "type": "number",
          "readOnly": true
        },
        "bottomMunicipal": {
          "type": "number",
          "readOnly": true
        },
        "mellemTax": {
          "type": "number",
          "readOnly": true
        },
        "topTax": {
          "type": "number",
          "readOnly": true
        },
        "topTopTax": {
          "type": "number",
          "readOnly": true
        },
        "netAnnual": {
          "type": "number",
          "readOnly": true
        },
        "netMonthly": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {
      "atpAnnual": 1188,
      "amRate": 0.08,
      "personalAllowance": 54100,
      "bottomRate": 0.1201,
      "mellemThreshold": 641200,
      "mellemRate": 0.075,
      "topThreshold": 777900,
      "topRate": 0.075,
      "topTopThreshold": 2818152,
      "topTopRate": 0.05,
      "rateGennemsnit": 0.2543,
      "rateKoebenhavn": 0.2339,
      "rateHoejeste": 0.263
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{'grossAnnual': 420000, 'kommune': 'gennemsnit', 'customMunicipalRate': 0.251}"
      }
    ],
    "derivations": [
      {
        "path": "$.municipalRate",
        "expr": "($s := kommune; $s = 'gennemsnit' ? $const.rateGennemsnit : $s = 'koebenhavn' ? $const.rateKoebenhavn : $s = 'hoejeste' ? $const.rateHoejeste : customMunicipalRate)"
      },
      {
        "path": "$.atp",
        "expr": "$round(grossAnnual > 0 ? $const.atpAnnual : 0, 2)"
      },
      {
        "path": "$.amBidrag",
        "expr": "($b := grossAnnual - atp; $round(($b > 0 ? $b : 0) * $const.amRate, 2))"
      },
      {
        "path": "$.afterAm",
        "expr": "($a := grossAnnual - amBidrag - atp; $round($a > 0 ? $a : 0, 2))"
      },
      {
        "path": "$.taxable",
        "expr": "($b := afterAm - $const.personalAllowance; $round($b > 0 ? $b : 0, 2))"
      },
      {
        "path": "$.bottomMunicipal",
        "expr": "$round(taxable * ($const.bottomRate + municipalRate), 2)"
      },
      {
        "path": "$.mellemTax",
        "expr": "$round(afterAm > $const.mellemThreshold ? (afterAm - $const.mellemThreshold) * $const.mellemRate : 0, 2)"
      },
      {
        "path": "$.topTax",
        "expr": "$round(afterAm > $const.topThreshold ? (afterAm - $const.topThreshold) * $const.topRate : 0, 2)"
      },
      {
        "path": "$.topTopTax",
        "expr": "$round(grossAnnual > $const.topTopThreshold ? (grossAnnual - $const.topTopThreshold) * $const.topTopRate : 0, 2)"
      },
      {
        "path": "$.netAnnual",
        "expr": "$round(grossAnnual - amBidrag - atp - bottomMunicipal - mellemTax - topTax - topTopTax, 2)"
      },
      {
        "path": "$.netMonthly",
        "expr": "$round(netAnnual / 12, 2)"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Løn efter skat",
          "layout": "vertical",
          "components": [
            {
              "id": "gross",
              "type": "numericField",
              "label": "Bruttoløn / år (DKK)",
              "bind": "$.grossAnnual"
            },
            {
              "id": "kommune",
              "type": "selectField",
              "label": "Kommune",
              "bind": "$.kommune",
              "helperText": "Kommuneskatten fastsættes af din kommune. Vælg en, eller indtast din egen procent.",
              "options": [
                {
                  "value": "gennemsnit",
                  "label": "Landsgennemsnit — 25,43 %"
                },
                {
                  "value": "koebenhavn",
                  "label": "København — 23,39 % (landets laveste)"
                },
                {
                  "value": "hoejeste",
                  "label": "Højeste kommuner (Lolland, Læsø, Svendborg, Vordingborg) — 26,30 %"
                },
                {
                  "value": "anden",
                  "label": "Anden kommune — indtast selv"
                }
              ]
            },
            {
              "id": "muni",
              "type": "numericField",
              "label": "Kommuneskat hvis « Anden » (f.eks. 0.251)",
              "bind": "$.customMunicipalRate"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netM",
                  "type": "statTile",
                  "label": "Netto / måned",
                  "bind": "$.netMonthly",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "id": "netY",
                  "type": "statTile",
                  "label": "Netto / år",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "DKK"
                }
              ]
            },
            {
              "id": "breakdown",
              "type": "keyValueList",
              "label": "Beregning",
              "items": [
                {
                  "label": "Kommuneskat",
                  "bind": "$.municipalRate"
                },
                {
                  "label": "Brutto",
                  "bind": "$.grossAnnual",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "AM-bidrag (8%)",
                  "bind": "$.amBidrag",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "Skattepligtig",
                  "bind": "$.taxable",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "Bund + kommuneskat",
                  "bind": "$.bottomMunicipal",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "Mellemskat",
                  "bind": "$.mellemTax",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "Topskat",
                  "bind": "$.topTax",
                  "format": "currency",
                  "currency": "DKK"
                },
                {
                  "label": "Netto",
                  "bind": "$.netAnnual",
                  "format": "currency",
                  "currency": "DKK"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'Danmark 2026: ATP + 8% AM-bidrag, personfradrag 54.100 kr., derefter bundskat 12,01% + kommuneskat, mellemskat 7,5% over 641.200 kr., topskat 7,5% over 777.900 kr. og top-topskat 5% over 2.818.152 kr. Beskæftigelsesfradraget er udeladt (forenklet). Skøn, ikke skatterådgivning. Kommuneskatten i 2026 går fra 23,39 % (København) til 26,30 %, med et landsgennemsnit på 25,43 %.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Kilder",
              "items": [
                {
                  "label": "Skattestyrelsen",
                  "url": "https://skat.dk",
                  "date": "2026-08-02"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "S1 420,000 DKK, average municipality",
        "given": {
          "$.grossAnnual": 420000,
          "$.kommune": "anden",
          "$.customMunicipalRate": 0.251
        },
        "expect": {
          "$.atp": 1188,
          "$.amBidrag": 33504.96,
          "$.afterAm": 385307.04,
          "$.taxable": 331207.04
        }
      },
      {
        "description": "S3 900,000 DKK — mellemskat and topskat both bind",
        "given": {
          "$.grossAnnual": 900000,
          "$.kommune": "anden",
          "$.customMunicipalRate": 0.251
        },
        "expect": {
          "$.amBidrag": 71904.96,
          "$.afterAm": 826907.04,
          "$.mellemTax": 13928.03,
          "$.topTax": 3675.53
        }
      },
      {
        "description": "S2 420.000 kr. i København — landets laveste kommuneskat",
        "given": {
          "$.grossAnnual": 420000,
          "$.kommune": "koebenhavn"
        },
        "expect": {
          "$.municipalRate": 0.2339,
          "$.bottomMunicipal": 117247.29
        }
      }
    ]
  }
}
