How the Türkiye serbest meslek calculator is verified

Inputs

InputFieldType
Annual income after expenses (TRY)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)
Bagkur BasebagkurBase$round($min([$max([annualIncome, $const.bagkurMinBase]), $const.bagkurMaxBase]), 2)
Bağ-Kur premiumsbagkurPremiums$round(bagkurBase * $const.bagkurRate, 2)
Taxable IncometaxableIncome$round($max([0, annualIncome - bagkurPremiums]), 2)
Income taxincomeTax($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))
Net income / yearnetIncome$round($max([0, annualIncome - bagkurPremiums - 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
bagkurRate0.3575
bagkurMinBase396360
bagkurMaxBase3567240
b1190000
b2400000
b31000000
b45300000
r10.15
r20.2
r30.27
r40.35
r50.4

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 — 1,200,000 TRY income — a typical full-time professional

given annualIncome1200000
expect bagkurBase1200000
expect bagkurPremiums429000
expect taxableIncome771000
expect incomeTax170670
expect netIncome600330

Case 2 — 300,000 TRY — below the Bağ-Kur minimum base

given annualIncome300000
expect bagkurBase396360
expect bagkurPremiums141698.7
expect taxableIncome158301.3
expect incomeTax23745.19
expect netIncome134556.11

Case 3 — 6,000,000 TRY — into the top bracket

given annualIncome6000000
expect bagkurBase3567240
expect bagkurPremiums1275288.3
expect taxableIncome4724711.7
expect incomeTax1536149.1
expect netIncome3188562.6

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 Türkiye serbest meslek calculator

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