How the Israel עצמאי calculator is verified

Inputs

InputFieldType
Annual income after expenses (ILS)annualIncomenumber

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 Insurance + health taxnationalInsurance($i := annualIncome; $round($const.niLowRate * $min([$i, $const.niStep]) + $const.niHighRate * $max([0, $min([$i, $const.niCeiling]) - $const.niStep]), 2))
Income tax (after credit points)incomeTax($i := annualIncome; $round($max([0, $const.r1 * $min([$i, $const.b1]) + $const.r2 * $max([0, $min([$i, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$i, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$i, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $min([$i, $const.b5]) - $const.b4]) + $const.r6 * $max([0, $min([$i, $const.b6]) - $const.b5]) + $const.r7 * $max([0, $i - $const.b6]) - $const.creditPoints * $const.creditPointValue]), 2))
Net income / yearnetIncome$round($max([0, annualIncome - nationalInsurance - incomeTax]), 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
niStep92436
niCeiling622920
niLowRate0.077
niHighRate0.18
creditPoints2.25
creditPointValue2904
b184120
b2120720
b3193800
b4269280
b5560280
b6721560
r10.1
r20.14
r30.2
r40.31
r50.35
r60.47
r70.5

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 — 300,000 ILS income — a typical full-time freelancer

given annualIncome300000
expect nationalInsurance44479.09
expect incomeTax55768.8
expect netIncome199752.11

Case 2 — 90,000 ILS — below the National Insurance step

given annualIncome90000
expect nationalInsurance6930
expect incomeTax2701.2
expect netIncome80368.8

Case 3 — 700,000 ILS — above the National Insurance ceiling

given annualIncome700000
expect nationalInsurance102604.69
expect incomeTax212535.2
expect netIncome384860.11

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 Israel עצמאי calculator

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