How the Japan 個人事業主 calculator is verified

Inputs

InputFieldType
Annual business income after expenses (JPY)annualBusinessIncomenumber

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)
National pensionnationalPension$round($const.pensionMonthly * 12, 2)
After Blue ReturnafterBlueReturn$round($max([0, annualBusinessIncome - $const.blueReturnDeduction]), 2)
Taxable IncometaxableIncome$round($max([0, afterBlueReturn - $const.basicDeduction - nationalPension]), 2)
Income tax (incl. surtax)incomeTax($t := taxableIncome; $round(($const.r1 * $min([$t, $const.b1]) + $const.r2 * $max([0, $min([$t, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$t, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$t, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $min([$t, $const.b5]) - $const.b4]) + $const.r6 * $max([0, $min([$t, $const.b6]) - $const.b5]) + $const.r7 * $max([0, $t - $const.b6])) * (1 + $const.reconstructionRate), 2))
Resident tax (10%)residentTax$round($const.residentRate * $max([0, afterBlueReturn - $const.residentBasicDeduction - nationalPension]), 2)
Net income / yearnetIncome$round($max([0, annualBusinessIncome - nationalPension - incomeTax - residentTax]), 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
blueReturnDeduction650000
pensionMonthly17920
basicDeduction580000
residentBasicDeduction430000
residentRate0.1
reconstructionRate0.021
b11950000
b23300000
b36950000
b49000000
b518000000
b640000000
r10.05
r20.1
r30.2
r40.23
r50.33
r60.4
r70.45

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 — 6,000,000 JPY business income — a typical full-time sole proprietor

given annualBusinessIncome6000000
expect nationalPension215040
expect afterBlueReturn5350000
expect taxableIncome4554960
expect incomeTax493645.33
expect residentTax470496
expect netIncome4820818.67

Case 2 — 2,500,000 JPY — part-time

given annualBusinessIncome2500000
expect nationalPension215040
expect afterBlueReturn1850000
expect taxableIncome1054960
expect incomeTax53855.71
expect residentTax120496
expect netIncome2110608.29

Case 3 — 15,000,000 JPY — into the 33% band

given annualBusinessIncome15000000
expect nationalPension215040
expect afterBlueReturn14350000
expect taxableIncome13554960
expect incomeTax2998816.67
expect residentTax1370496
expect netIncome10415647.33

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.