How the Japan 自動車税 calculator is verified

Inputs

InputFieldType
排気量 (cc)ccnumber
初度登録からの年数ageYearsnumber

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)
自動車税(排気量別)baseTax($c := cc; $round($c <= 1000 ? 25000 : $c <= 1500 ? 30500 : $c <= 2000 ? 36000 : $c <= 2500 ? 43500 : $c <= 3000 ? 50000 : $c <= 3500 ? 57000 : $c <= 4000 ? 65500 : $c <= 4500 ? 75500 : $c <= 6000 ? 87000 : 110000, 2))
13年超の重課oldCarSurcharge$round(ageYears >= $const.oldCarFromYear ? baseTax * $const.oldCarRate : 0, 2)
年額tax$round(baseTax + oldCarSurcharge, 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.

ConstantValue
oldCarRate0.15
oldCarFromYear13

Test vectors (3)

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 1,496 cc, 3年 — 標準税額

given cc1496
given ageYears3
expect baseTax30500
expect oldCarSurcharge0
expect tax30500

Case 2 — C2 2,494 cc, 3年

given cc2494
given ageYears3
expect baseTax43500
expect tax43500

Case 3 — C3 1,496 cc, 14年 — 13年超の重課15%

given cc1496
given ageYears14
expect oldCarSurcharge4575
expect tax35075

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 Japan 自動車税 calculator

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