How the Ireland sole trader calculator is verified

Inputs

InputFieldType
Annual profit after expenses (EUR)annualProfitnumber

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)
Income tax (after credits)incomeTax($p := annualProfit; $round($max([0, $const.lowRate * $min([$p, $const.standardBand]) + $const.highRate * $max([0, $p - $const.standardBand]) - $const.taxCredits]), 2))
USCusc($p := annualProfit; $round($p <= $const.uscExemption ? 0 : $const.uscR1 * $min([$p, $const.uscB1]) + $const.uscR2 * $max([0, $min([$p, $const.uscB2]) - $const.uscB1]) + $const.uscR3 * $max([0, $min([$p, $const.uscB3]) - $const.uscB2]) + $const.uscR4 * $max([0, $p - $const.uscB3]), 2))
Class S PRSIprsi$round(annualProfit < $const.prsiFloor ? 0 : $max([$const.prsiMinimum, annualProfit * $const.prsiRate]), 2)
Net income / yearnetIncome$round($max([0, annualProfit - incomeTax - usc - prsi]), 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
standardBand44000
lowRate0.2
highRate0.4
taxCredits3750
uscB112012
uscB228700
uscB370044
uscR10.005
uscR20.02
uscR30.03
uscR40.08
uscExemption13000
prsiRate0.042375
prsiMinimum650
prsiFloor5000

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 — 60,000 EUR profit — a typical full-time sole trader

given annualProfit60000
expect incomeTax11450
expect usc1332.82
expect prsi2542.5
expect netIncome44674.68

Case 2 — 25,000 EUR — part-time, standard rate only

given annualProfit25000
expect incomeTax1250
expect usc319.82
expect prsi1059.38
expect netIncome22370.8

Case 3 — 120,000 EUR — into the top USC band

given annualProfit120000
expect incomeTax35450
expect usc5630.62
expect prsi5085
expect netIncome73834.38

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 Ireland sole trader calculator

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