How the Finland toiminimi calculator is verified

Inputs

InputFieldType
Annual business income (EUR)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)
Yel IncomeyelIncome$round($min([$max([annualIncome, $const.yelMin]), $const.yelMax]), 2)
YEL premium (24.4%)yelPremium$round(yelIncome * $const.yelRate, 2)
Taxable IncometaxableIncome$round($max([0, annualIncome - yelPremium]), 2)
State income taxstateTax($t := taxableIncome; $round($const.r1 * $min([$t, $const.b1]) + $const.r2 * $max([0, $min([$t, $const.b2]) - $const.b1]) + $const.r3 * $max([0, $min([$t, $const.b3]) - $const.b2]) + $const.r4 * $max([0, $min([$t, $const.b4]) - $const.b3]) + $const.r5 * $max([0, $t - $const.b4]), 2))
Municipal taxmunicipalTax$round(taxableIncome * $const.municipalRate, 2)
Net income / yearnetIncome$round($max([0, annualIncome - yelPremium - stateTax - municipalTax]), 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
yelRate0.244
yelMin9423.09
yelMax214000
municipalRate0.0757
b122000
b232600
b340100
b452100
r10.1264
r20.19
r30.3025
r40.3325
r50.375

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 — 50,000 EUR business income — a typical full-time entrepreneur

given annualIncome50000
expect yelIncome50000
expect yelPremium12200
expect taxableIncome37800
expect stateTax6367.8
expect municipalTax2861.46
expect netIncome28570.74

Case 2 — 20,000 EUR — part-time

given annualIncome20000
expect yelIncome20000
expect yelPremium4880
expect taxableIncome15120
expect stateTax1911.17
expect municipalTax1144.58
expect netIncome12064.25

Case 3 — 120,000 EUR — well into the top state band

given annualIncome120000
expect yelIncome120000
expect yelPremium29280
expect taxableIncome90720
expect stateTax25536.05
expect municipalTax6867.5
expect netIncome58316.45

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 Finland toiminimi calculator

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