calculate_registreringsafgift
Calculate DANISH vehicle registration tax (registreringsafgift) for a new or used personbil, varebil or motorcykel under registreringsafgiftsloven. Same engine and validation as bildata.io's public calculator. Amounts in DKK; an estimate, not an official Motorstyrelsen valuation. REQUIRED PAIRS: condition="new" needs bruttovaerdi; condition="used" needs handelspris AND nypris (nypris is the used vehicle's own original price when new, not the new-vehicle price field). ALWAYS send co2 for a petrol, diesel or hybrid vehicle: an omitted co2 counts as 0 g/km, i.e. battery-electric, and collapses the tax to near zero with no error raised. Send every number as a JSON number (300000, not "300000"), use enum values exactly as listed, and OMIT an optional field you do not know rather than sending null.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| co2 | No | WLTP CO2 in g/km. Send it for ANY fuel-burning vehicle: an omitted value and an explicit 0 are BOTH read as battery-electric (EV phase-in and EV bundfradrag), which makes the tax far too low. Use 0 only for a pure EV. | |
| aaben | No | Varebil only: open cargo bed (ladvogn) | |
| avgKm | No | Used: average odometer km of the comparable adverts. Part of the actualKm/avgKm/vehicleAgeYears set — a partial send is silently ignored. | |
| nypris | No | Used vehicles: REQUIRED when condition="used". The SAME vehicle's original price as new in DKK, incl. all taxes. Unused when condition="new" — for a new vehicle use bruttovaerdi. | |
| actualKm | No | Used: actual odometer km. The km regulation is skipped entirely unless actualKm, avgKm, vehicleAgeYears AND handelspris are all present. | |
| condition | Yes | new = first registration of a new vehicle; used = import/revaluation of a used vehicle | |
| elForbrug | No | Electric consumption in Wh/km. Send WITH elRaekkevidde — the battery deduction is (elForbrug/1000) * elRaekkevidde, so either one alone is a no-op. | |
| isElectric | No | MOTORCYKEL: the EV switch for that vehicle type. For personbil and varebil the drivetrain comes from co2 (0 or absent = electric), so this flag does not change the tax — but DO send it for a battery-electric personbil or varebil: it is read as your declaration that the missing co2 is deliberate, and suppresses the warning that the answer looks too low. | |
| targetYear | No | Rules year to calculate under (default: current). A year with no published table silently falls back to the current rates; the answer's rules_year says which table actually applied. | |
| totalvaegt | No | Varebil only: total weight in kg | |
| handelspris | No | Used vehicles: REQUIRED when condition="used". Current Danish trade price in DKK, incl. registration tax. Unused when condition="new". | |
| vehicleType | Yes | Vehicle category under Danish law | |
| bruttovaerdi | No | New vehicles: REQUIRED when condition="new" (unused when condition="used"). Taxable value in DKK, i.e. price incl. VAT and margin BEFORE registration tax. NOT the advertised Danish showroom price, which already contains the tax being calculated. | |
| elRaekkevidde | No | Electric range in km (WLTP). Send WITH elForbrug — either one alone is a no-op. | |
| condition_stand | No | Used: maintenance condition (vedligeholdelsesstand) | |
| vehicleAgeYears | No | Used: vehicle age in years since first registration. Also used on its own for the under-6-months rule, so send it even when you cannot supply the km set. The km regulation additionally needs actualKm, avgKm and handelspris — that part is skipped unless all are present. | |
| allDealerListings | No | Used: true only if EVERY comparable advert is a dealer listing (enables annoncefradrag + leveringsomkostninger) |