How the Pakistan business income tax calculator is verified

Inputs

InputFieldType
Business or professional receipts for the year (PKR)annualTurnovernumber
Deductible business expenses (PKR)annualExpensesnumber

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)
Taxable incometaxableIncome$round($max([0, $n(annualTurnover) - $n(annualExpenses)]), 2)
Income tax (Division I clause 1)incomeTax$round($bandedCharge(taxableIncome, [{"upTo": $const.band1, "rate": $const.rate0}, {"upTo": $const.band2, "rate": $const.rate1}, {"upTo": $const.band3, "rate": $const.rate2}, {"upTo": $const.band4, "rate": $const.rate3}, {"upTo": $const.band5, "rate": $const.rate4}, {"upTo": null, "rate": $const.rate5}]), 2)
Surcharge 10% (taxable income above Rs10 million)surchargetaxableIncome > $const.surchargeThreshold ? $round(incomeTax * $const.surchargeRate, 2) : 0
Tax incl. surchargetotalTax$round(incomeTax + surcharge, 2)
Income after taxnetIncome$round($max([0, taxableIncome - totalTax]), 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
band1600000
band21200000
band31600000
band43200000
band55600000
rate00
rate10.15
rate20.2
rate30.3
rate40.4
rate50.45
surchargeRate0.1
surchargeThreshold10000000

Test vectors (6)

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 — S1 Rs3,000,000 of profit: Rs170,000 + 30% of Rs1,400,000 = Rs590,000

given annualTurnover5000000
given annualExpenses2000000
expect taxableIncome3000000
expect incomeTax590000
expect surcharge0
expect totalTax590000
expect netIncome2410000

Case 2 — S2 Rs12,000,000 of profit: Rs1,610,000 + 45% of Rs6,400,000, plus the 10% surcharge

given annualTurnover20000000
given annualExpenses8000000
expect incomeTax4490000
expect surcharge449000
expect totalTax4939000
expect netIncome7061000

Case 3 — S3 exactly Rs10,000,000: not “exceeds”, so no surcharge

given annualTurnover10000000
given annualExpenses0
expect incomeTax3590000
expect surcharge0

Case 4 — S4 Rs600,000 of profit: nil band

given annualTurnover900000
given annualExpenses300000
expect incomeTax0
expect netIncome600000

Case 5 — S5 Rs1,600,000 of profit: the table’s Rs170,000

given annualTurnover1600000
given annualExpenses0
expect incomeTax170000

Case 6 — S6 expenses above receipts: no taxable income

given annualTurnover1000000
given annualExpenses1500000
expect taxableIncome0
expect totalTax0
expect netIncome0

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 Pakistan business income tax calculator

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