How the Japan 自動車税 calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| 排気量 (cc) | cc | number |
| 初度登録からの年数 | ageYears | number |
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) |
|---|---|---|
| 自動車税(排気量別) | 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.
| Constant | Value |
|---|---|
oldCarRate | 0.15 |
oldCarFromYear | 13 |
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 cc | 1496 |
|---|---|
given ageYears | 3 |
expect baseTax | 30500 |
expect oldCarSurcharge | 0 |
expect tax | 30500 |
Case 2 — C2 2,494 cc, 3年
given cc | 2494 |
|---|---|
given ageYears | 3 |
expect baseTax | 43500 |
expect tax | 43500 |
Case 3 — C3 1,496 cc, 14年 — 13年超の重課15%
given cc | 1496 |
|---|---|
given ageYears | 14 |
expect oldCarSurcharge | 4575 |
expect tax | 35075 |
Sources
- 総務省 — 自動車税 · checked 2026-08-05
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.