How the Sweden lön efter skatt calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Bruttolön / år (SEK) | grossAnnual | number |
| Kommun | kommun | string |
| Kommunalskatt om « Annan » (t.ex. 0.3241) | customMunicipalRate | number |
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 value | Field | Formula (JSONata) |
|---|---|---|
| Kommunalskatt | municipalRate | ($s := kommun; $s = 'genomsnitt' ? $const.rateGenomsnitt : $s = 'stockholm' ? $const.rateStockholm : $s = 'goteborg' ? $const.rateGoteborg : $s = 'malmo' ? $const.rateMalmo : $s = 'osteraker' ? $const.rateOsteraker : $s = 'dorotea' ? $const.rateDorotea : customMunicipalRate) |
| Beskattningsbar | taxable | ($b := grossAnnual - $const.grundavdrag; $round($b > 0 ? $b : 0, 2)) |
| Kommunalskatt | municipalTax | $round(taxable * municipalRate, 2) |
| Jobbskatteavdrag | jobbskatteavdrag | ($j := taxable * 0.09; $round($j < $const.jobbCap ? $j : $const.jobbCap, 2)) |
| Statlig skatt | stateTax | $round(grossAnnual > $const.stateThreshold ? (grossAnnual - $const.stateThreshold) * $const.stateRate : 0, 2) |
| Netto / år | netAnnual | $round(grossAnnual - (municipalTax - jobbskatteavdrag) - stateTax, 2) |
| Netto / månad | netMonthly | $round(netAnnual / 12, 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.
| Constant | Value |
|---|---|
grundavdrag | 24300 |
stateThreshold | 660400 |
stateRate | 0.2 |
jobbCap | 46200 |
rateGenomsnitt | 0.3238 |
rateStockholm | 0.304 |
rateGoteborg | 0.326 |
rateMalmo | 0.324 |
rateOsteraker | 0.2893 |
rateDorotea | 0.3565 |
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 — S1 420,000 SEK, average kommun
given grossAnnual | 420000 |
|---|---|
given kommun | annan |
given customMunicipalRate | 0.3241 |
expect taxable | 395700 |
expect municipalTax | 128246.37 |
expect jobbskatteavdrag | 35613 |
Case 2 — S2 700,000 SEK — state tax binds
given grossAnnual | 700000 |
|---|---|
given kommun | annan |
given customMunicipalRate | 0.3241 |
expect taxable | 675700 |
expect jobbskatteavdrag | 46200 |
expect stateTax | 7920 |
Case 3 — S3 420.000 kr i Stockholm — lägre kommunalskatt än riksgenomsnittet
given grossAnnual | 420000 |
|---|---|
given kommun | stockholm |
expect municipalRate | 0.304 |
expect municipalTax | 120292.8 |
Sources
- Skatteverket · checked 2026-08-02
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 Sweden lön efter skatt calculator
Built with Valem — a live, verifiable calculator you can fork and embed.