How the Denmark selvstændig calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Annual surplus (DKK) | annualSurplus | 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) |
|---|---|---|
| AM-bidrag (8%) | amBidrag | $round(annualSurplus * $const.amRate, 2) |
| After Am Bidrag | afterAmBidrag | $round(annualSurplus - amBidrag, 2) |
| Bottom + municipal + health tax | baseTax | $round($const.baseRate * $max([0, afterAmBidrag - $const.personalAllowance]), 2) |
| Intermediate / top / top-top tax | bracketTax | ($a := afterAmBidrag; $round($const.mellemRate * $max([0, $min([$a, $const.topStart]) - $const.mellemStart]) + $const.topRate * $max([0, $min([$a, $const.topTopStart]) - $const.topStart]) + $const.topTopRate * $max([0, $a - $const.topTopStart]), 2)) |
| Net income / year | netIncome | $round($max([0, annualSurplus - amBidrag - baseTax - bracketTax]), 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 |
|---|---|
amRate | 0.08 |
personalAllowance | 54100 |
baseRate | 0.34 |
mellemStart | 641200 |
topStart | 777900 |
topTopStart | 2592700 |
mellemRate | 0.075 |
topRate | 0.075 |
topTopRate | 0.05 |
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 — 600,000 DKK surplus — a typical full-time freelancer
given annualSurplus | 600000 |
|---|---|
expect amBidrag | 48000 |
expect afterAmBidrag | 552000 |
expect baseTax | 169286 |
expect bracketTax | 0 |
expect netIncome | 382714 |
Case 2 — 250,000 DKK — part-time
given annualSurplus | 250000 |
|---|---|
expect amBidrag | 20000 |
expect afterAmBidrag | 230000 |
expect baseTax | 59806 |
expect bracketTax | 0 |
expect netIncome | 170194 |
Case 3 — 1,200,000 DKK — into the top bracket
given annualSurplus | 1200000 |
|---|---|
expect amBidrag | 96000 |
expect afterAmBidrag | 1104000 |
expect baseTax | 356966 |
expect bracketTax | 34710 |
expect netIncome | 712324 |
Sources
- Skattestyrelsen — AM-bidrag (labour market contribution) · checked 2026-08-22
- Nye skattegrænser 2026: mellemskat, topskat og top-topskat · checked 2026-08-22
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 Denmark selvstændig calculator
Built with Valem — a live, verifiable calculator you can fork and embed.