How the Iceland bifreiðagjald calculator is verified

Inputs

InputFieldType
CO₂ test standard on the registrationco2Standardstring
Registered CO₂ emissions (g/km)co2number
Vehicle weight (kg)weightKgnumber
Kilometres driven per yearkmPerYearnumber
Car older than 25 years at the start of the yearover25Yearsboolean

The formula

Each derived value below is computed by the Valem engine from the expression shown, in this order. Nothing else runs — there is no hidden code path.

Derived valueFieldFormula (JSONata)
Bifreiðagjald per half-year periodvehicleTaxPerPeriodweightKg > $const.heavyWeightThreshold ? ($h := $const.heavyBasePerPeriod + (weightKg - $const.heavyWeightThreshold) * $const.heavyPerKg; $round($h > $const.heavyMaxPerPeriod ? $const.heavyMaxPerPeriod : $h, 0)) : ($t := co2Standard = 'nedc' ? $const.nedcThreshold : $const.wltpThreshold; $g := co2Standard = 'nedc' ? $const.nedcPerGram : $const.wltpPerGram; $over := co2 - $t; $const.baseFeePerPeriod + ($over > 0 ? $over * $g : 0))
Bifreiðagjald per year (two periods)vehicleTaxAnnualover25Years ? 0 : vehicleTaxPerPeriod * 2
KílómetragjaldkilometreCharge$round(kmPerYear * $const.kmChargePerKm, 0)
Total per yearannualTotalvehicleTaxAnnual + kilometreCharge

Rates and thresholds

The expressions above read these as $const. They are the figures the annual refresh replaces, so they live as data rather than being written into the formulas — which is what makes a year-on-year change a one-line diff instead of an edit to arithmetic.

ConstantValue
baseFeePerPeriod21260
wltpThreshold204
wltpPerGram154
nedcThreshold168
nedcPerGram188
heavyWeightThreshold3500
heavyBasePerPeriod73795
heavyPerKg3.1
heavyMaxPerPeriod115450
kmChargePerKm6.95

Test vectors (6)

Every case is executed against this model on each build, by the Java engine and independently by a JavaScript one. A mismatch of a single cent fails the build, so the page cannot ship advertising a figure the model no longer produces.

Case 1 — K1 150 g/km WLTP, 1,600 kg, 12,000 km: base fee only, plus the kilometre charge

given co2Standardwltp
given co2150
given weightKg1600
given kmPerYear12000
given over25Yearsno
expect vehicleTaxPerPeriod21260
expect vehicleTaxAnnual42520
expect kilometreCharge83400
expect annualTotal125920

Case 2 — K2 250 g/km WLTP: 46 g over the 204 threshold at 154 kr

given co2Standardwltp
given co2250
given weightKg1900
given kmPerYear12000
given over25Yearsno
expect vehicleTaxPerPeriod28344
expect vehicleTaxAnnual56688
expect annualTotal140088

Case 3 — K3 200 g/km NEDC: 32 g over the 168 threshold at 188 kr

given co2Standardnedc
given co2200
given weightKg1500
given kmPerYear0
given over25Yearsno
expect vehicleTaxPerPeriod27276
expect vehicleTaxAnnual54552

Case 4 — K4 an electric car pays the base fee and the kilometre charge

given co2Standardwltp
given co20
given weightKg2100
given kmPerYear15000
given over25Yearsno
expect vehicleTaxAnnual42520
expect kilometreCharge104250
expect annualTotal146770

Case 5 — K5 4,000 kg: weight-based, 73,795 + 500 × 3.10

given co2Standardwltp
given co2300
given weightKg4000
given kmPerYear0
given over25Yearsno
expect vehicleTaxPerPeriod75345
expect vehicleTaxAnnual150690

Case 6 — K6 a car over 25 years old pays no bifreiðagjald, but still the kilometre charge

given co2Standardnedc
given co2220
given weightKg1300
given kmPerYear5000
given over25Yearsyes
expect vehicleTaxAnnual0
expect annualTotal34750

Sources

Check it yourself — and reuse it

The whole model as JSON — inputs, outputs, formulas, vectors and sources in one re-runnable document.

This model is published under CC BY 4.0: use it, adapt it, build on it, with attribution. The licence covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds are law, and nobody licenses those; the sources above are where they come from.

← Back to the Iceland bifreiðagjald calculator

Built with Valem — a live, verifiable calculator you can fork and embed.