How the Germany car tax calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Engine displacement (cm³) | displacement | number |
| CO₂ emissions (g/km) | co2 | number |
| Diesel (otherwise petrol) | diesel | boolean |
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 value | Field | Formula (JSONata) |
|---|---|---|
| Displacement Units | displacementUnits | $ceil(displacement / 100) |
| Displacement part | displacementTax | $round(displacementUnits * (diesel ? $const.dieselPer100 : $const.petrolPer100), 2) |
| CO₂ part (above 95 g/km) | co2Tax | ($c := co2; $b1 := (($c < 115 ? $c : 115) - 95); $b1 := ($b1 > 0 ? $b1 : 0) * 2.00; $b2 := ($c > 115 ? (($c < 135 ? $c : 135) - 115) : 0) * 2.20; $b3 := ($c > 135 ? (($c < 155 ? $c : 155) - 135) : 0) * 2.50; $b4 := ($c > 155 ? (($c < 175 ? $c : 175) - 155) : 0) * 2.90; $b5 := ($c > 175 ? (($c < 195 ? $c : 195) - 175) : 0) * 3.40; $b6 := ($c > 195 ? ($c - 195) : 0) * 4.00; $round($b1 + $b2 + $b3 + $b4 + $b5 + $b6, 2)) |
| Annual tax | annualTax | $round(displacementTax + co2Tax, 2) |
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.
| Constant | Value |
|---|---|
petrolPer100 | 2 |
dieselPer100 | 9.5 |
co2Free | 95 |
Test vectors (2)
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 — C1 petrol 1,398 cm³, 122 g/km
given displacement | 1398 |
|---|---|
given co2 | 122 |
given diesel | no |
expect displacementUnits | 14 |
expect displacementTax | 28 |
expect co2Tax | 55.4 |
expect annualTax | 83.4 |
Case 2 — C2 diesel 1,968 cm³, 145 g/km
given displacement | 1968 |
|---|---|
given co2 | 145 |
given diesel | yes |
expect displacementUnits | 20 |
expect displacementTax | 190 |
expect co2Tax | 109 |
expect annualTax | 299 |
Sources
- Zoll — Kraftfahrzeugsteuer · checked 2026-08-02
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 Germany car tax calculator
Built with Valem — a live, verifiable calculator you can fork and embed.