{
  "$comment": "Machine-readable companion to https://valem.run/calculators/denmark/car-tax. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/denmark/car-tax",
  "dataUrl": "https://valem.run/calculators/denmark/car-tax.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Denmark grøn ejerafgift model by Valem (https://valem.run/calculators/denmark/car-tax), 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/car-tax/verify",
  "country": "denmark",
  "countryName": "Denmark",
  "formula": "car-tax",
  "formulaName": "Grøn ejerafgift",
  "title": "Grøn Ejerafgift — Denmark car tax",
  "answer": "Denmark's green ownership tax is based on fuel efficiency in km per litre — thirstier cars pay much more.",
  "lang": "en",
  "currency": "DKK",
  "taxYear": "2026",
  "verification": {
    "claim": "shape-only",
    "statement": "The rates in this model are illustrative. Its 2 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": 2,
    "ratesAreIllustrative": true,
    "sourcesCheckedOn": "2026-08-02"
  },
  "sources": [
    {
      "label": "Motorstyrelsen",
      "url": "https://motorst.dk",
      "checked": "2026-08-02"
    }
  ],
  "terminalOutput": "tax",
  "inputs": [
    {
      "name": "kmPerL",
      "type": "number",
      "label": "Brændstoføkonomi (km/l)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "tax",
      "type": "number",
      "label": "Årlig afgift",
      "format": "currency",
      "formula": "($e := kmPerL; $round($e >= 20 ? 400 : $e >= 15 ? 800 : $e >= 10 ? 1600 : 2600, 2))"
    }
  ],
  "testCases": [
    {
      "description": "C1 petrol 18 km/l",
      "given": {
        "kmPerL": 18
      },
      "expect": {
        "tax": 800
      }
    },
    {
      "description": "C2 petrol 12 km/l",
      "given": {
        "kmPerL": 12
      },
      "expect": {
        "tax": 1600
      }
    }
  ],
  "spec": {
    "id": "car-tax-denmark",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "kmPerL": {
          "type": "number",
          "minimum": 0
        },
        "tax": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {},
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ 'kmPerL': 18 }"
      }
    ],
    "derivations": [
      {
        "path": "$.tax",
        "expr": "($e := kmPerL; $round($e >= 20 ? 400 : $e >= 15 ? 800 : $e >= 10 ? 1600 : 2600, 2))"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Grøn ejerafgift",
          "layout": "vertical",
          "components": [
            {
              "id": "illustrativeNotice",
              "type": "alert",
              "variant": "warning",
              "label": "Illustrative satser — ikke den officielle tabel",
              "text": "'Den grønne ejerafgift følger en tabel med omkring tredive brændstoføkonomi-intervaller, hver med sit eget halvårlige beløb, plus et dieseludligningstillæg der også varierer. Satserne er steget gradvist siden 2022 og nåede i 2026 den sidste planlagte stigning, 36,9 % over 2021-niveauet. Til sammenligning betaler en benzinbil på 20 km/l omkring 1.390 kr. om året, og en elbil cirka 460 kr. per halvår. Tallene i denne beregner viser formen — jo mere sparsommelig, jo lavere afgift — men ikke de faktiske satser. Slå din bil op i Motorregistret eller hos Skattestyrelsen på skat.dk.'"
            },
            {
              "id": "eff",
              "type": "numericField",
              "label": "Brændstoføkonomi (km/l)",
              "bind": "$.kmPerL"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "taxTile",
                  "type": "statTile",
                  "label": "Årlig afgift",
                  "bind": "$.tax",
                  "format": "currency",
                  "currency": "DKK"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'Danmark: grøn ejerafgift efter brændstoføkonomi (km/l); jo mere sparsommelig, jo lavere afgift. Dieseludligning kan gælde. Illustrative satser. Skøn, ikke skatterådgivning.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Kilder",
              "items": [
                {
                  "label": "Motorstyrelsen",
                  "url": "https://motorst.dk",
                  "date": "2026-08-02"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "C1 petrol 18 km/l",
        "given": {
          "$.kmPerL": 18
        },
        "expect": {
          "$.tax": 800
        }
      },
      {
        "description": "C2 petrol 12 km/l",
        "given": {
          "$.kmPerL": 12
        },
        "expect": {
          "$.tax": 1600
        }
      }
    ]
  }
}
