How the Iceland útborguð laun calculator is verified

Inputs

InputFieldType
Gross monthly salarygrossMonthlynumber
Supplementary pension (séreign), % of salarysupplementaryPensionPctnumber

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)
Pension premium (4%)pensionPremium$round($n(grossMonthly) * $const.pensionRate, 0)
Supplementary pensionsupplementaryPremium($r := $n(supplementaryPensionPct) / 100; $r := $r > $const.supplementaryPensionCap ? $const.supplementaryPensionCap : ($r < 0 ? 0 : $r); $round($n(grossMonthly) * $r, 0))
Tax basetaxBase($v := $n(grossMonthly) - pensionPremium - supplementaryPremium; $v < 0 ? 0 : $v)
Tax before personal credittaxBeforeCredit$round($bandedCharge(taxBase, [{"upTo": $const.bracket1Ceiling, "rate": $const.rateBracket1}, {"upTo": $const.bracket2Ceiling, "rate": $const.rateBracket2}, {"upTo": null, "rate": $const.rateBracket3}]), 2)
Staðgreiðsla / monthwithholdingTax($t := taxBeforeCredit - $const.personalCreditMonthly; $t < 0 ? 0 : $round($t, 0))
Net / monthnetMonthly$round($n(grossMonthly) - pensionPremium - supplementaryPremium - withholdingTax, 0)

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
bracket1Ceiling498122
bracket2Ceiling1398450
rateBracket10.3149
rateBracket20.3799
rateBracket30.4629
personalCreditMonthly72492
pensionRate0.04
supplementaryPensionCap0.04

Test vectors (5)

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 — I1 700,000 kr a month: two brackets, then the credit

given grossMonthly700000
given supplementaryPensionPct0
expect pensionPremium28000
expect taxBase672000
expect taxBeforeCredit222914.87
expect withholdingTax150423
expect netMonthly521577

Case 2 — I2 300,000 kr: first bracket only

given grossMonthly300000
given supplementaryPensionPct0
expect taxBase288000
expect withholdingTax18199
expect netMonthly269801

Case 3 — I3 200,000 kr: the personal credit wipes out the tax

given grossMonthly200000
given supplementaryPensionPct0
expect withholdingTax0
expect netMonthly192000

Case 4 — I4 2,000,000 kr reaches the 46.29% bracket

given grossMonthly2000000
given supplementaryPensionPct0
expect taxBase1920000
expect withholdingTax667827
expect netMonthly1252173

Case 5 — I5 4% séreign at 700,000 kr lowers the tax base

given grossMonthly700000
given supplementaryPensionPct4
expect supplementaryPremium28000
expect taxBase644000
expect withholdingTax139786
expect netMonthly504214

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 Iceland útborguð laun calculator

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