How the Singapore road tax calculator is verified

Inputs

InputFieldType
Engine capacity (cc)ccnumber
Vehicle age (years)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)
Base 6-monthly road taxbaseSixMonth($c := cc; $b := $c <= 600 ? 200 : $c <= 1000 ? 200 + 0.125 * ($c - 600) : $c <= 1600 ? 250 + 0.375 * ($c - 1000) : $c <= 3000 ? 475 + 0.75 * ($c - 1600) : 1525 + 1.0 * ($c - 3000); $round($b * $const.rebateFactor, 2))
Age surchargeageSurcharge($a := ageYears; $a < 10 ? 0 : $a < 11 ? 0.10 : $a < 12 ? 0.20 : $a < 13 ? 0.30 : $a < 14 ? 0.40 : 0.50)
6-monthly payablesixMonth$round(baseSixMonth * (1 + ageSurcharge), 2)
Annual road taxtax$round(sixMonth * 2, 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
rebateFactor0.782

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,598 cc sedan, 3 years old — the worked LTA example

given cc1598
given ageYears3
expect baseSixMonth370.86
expect ageSurcharge0
expect sixMonth370.86
expect tax741.72

Case 2 — C2 same car at 12 years — 30% age surcharge

given cc1598
given ageYears12
expect ageSurcharge0.3
expect sixMonth482.12
expect tax964.24

Case 3 — C3 small 600 cc car — the flat bottom band

given cc600
given ageYears2
expect baseSixMonth156.4
expect tax312.8

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 Singapore road tax calculator

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