How the Cyprus self-employed calculator is verified

Inputs

InputFieldType
Annual income after expenses (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)
Social insurance (16.6%)socialInsurance$round($min([annualIncome, $const.siCeiling]) * $const.siRate, 2)
GHS (4%)ghsContribution$round($min([annualIncome, $const.ghsCeiling]) * $const.ghsRate, 2)
Taxable IncometaxableIncome$round($max([0, annualIncome - socialInsurance - ghsContribution]), 2)
Income taxincomeTax($t := taxableIncome; $round($const.r2 * $max([0, $min([$t, $const.b2]) - $const.free]) + $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))
Net income / yearnetIncome$round($max([0, annualIncome - socialInsurance - ghsContribution - incomeTax]), 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
siRate0.166
siCeiling62868
ghsRate0.04
ghsCeiling180000
free22000
b232000
b342000
b472000
r20.2
r30.25
r40.3
r50.35

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 income — a typical full-time freelancer

given annualIncome50000
expect socialInsurance8300
expect ghsContribution2000
expect taxableIncome39700
expect incomeTax3925
expect netIncome35775

Case 2 — 20,000 EUR — below the tax-free threshold once contributions come off

given annualIncome20000
expect socialInsurance3320
expect ghsContribution800
expect taxableIncome15880
expect incomeTax0
expect netIncome15880

Case 3 — 100,000 EUR — above the social-insurance ceiling

given annualIncome100000
expect socialInsurance10436.09
expect ghsContribution4000
expect taxableIncome85563.91
expect incomeTax18247.37
expect netIncome67316.54

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 Cyprus self-employed calculator

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