How the Italy stipendio netto calculator is verified

Inputs

InputFieldType
Retribuzione lorda annua (EUR)grossAnnualnumber

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)
INPSinps$round(grossAnnual * $const.inpsRate, 2)
Imponibile IRPEFtaxableIrpef$round(grossAnnual - inps, 2)
IRPEF lordairpefGross($t := taxableIrpef; $round((($t < $const.band1 ? $t : $const.band1) * 0.23) + (($t > $const.band1 ? (($t < $const.band2 ? $t : $const.band2) - $const.band1) : 0) * 0.35) + (($t > $const.band2 ? ($t - $const.band2) : 0) * 0.43), 2))
Detrazione lavoro dipendentedetrazione($r := taxableIrpef; $d := $r <= 15000 ? 1955 : $r <= 28000 ? 1910 + 1190 * (28000 - $r) / 13000 : $r <= 50000 ? 1910 * (50000 - $r) / 22000 : 0; $round($d, 2))
IRPEF nettairpefNet($x := irpefGross - detrazione; $round($x > 0 ? $x : 0, 2))
Netto / annonetAnnual$round(grossAnnual - inps - irpefNet, 2)
Netto / mese (su 13)netMonthly$round(netAnnual / 13, 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
inpsRate0.0919
band128000
band250000

Test vectors (2)

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 — S1 30,000 EUR single

given grossAnnual30000
expect inps2757
expect taxableIrpef27243
expect irpefGross6265.89
expect detrazione1979.29
expect irpefNet4286.6
expect netAnnual22956.4

Case 2 — S3 80,000 EUR single

given grossAnnual80000
expect inps7352
expect taxableIrpef72648

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 Italy stipendio netto calculator

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