How the Pakistan salary after tax calculator is verified

Inputs

InputFieldType
Gross monthly salary (PKR)grossMonthlynumber
Bonus for the tax year (PKR)annualBonusnumber
Insured with EOBI (employee share 1% of the minimum wage)eobiInsuredboolean
Minimum wage EOBI charges on (PKR / month)eobiMinimumWagenumber

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 salary for the yeargrossAnnual$round($n(grossMonthly) * 12 + $n(annualBonus), 2)
Income tax for the yearincomeTaxAnnual$round($bandedCharge(grossAnnual, [{"upTo": $const.salariedBand1, "rate": $const.salariedRate0}, {"upTo": $const.salariedBand2, "rate": $const.salariedRate1}, {"upTo": $const.salariedBand3, "rate": $const.salariedRate2}, {"upTo": $const.salariedBand4, "rate": $const.salariedRate3}, {"upTo": $const.salariedBand5, "rate": $const.salariedRate4}, {"upTo": $const.salariedBand6, "rate": $const.salariedRate5}, {"upTo": $const.salariedBand7, "rate": $const.salariedRate6}, {"upTo": null, "rate": $const.salariedRate7}]), 2)
Income tax / monthincomeTaxMonthly$round(incomeTaxAnnual / 12, 2)
EOBI 1% / montheobiMonthlyeobiInsured ? $round($n(eobiMinimumWage) * $const.eobiEmployeeRate, 2) : 0
Net / yearnetAnnual$round($max([0, grossAnnual - incomeTaxAnnual - eobiMonthly * 12]), 2)
Net / monthnetMonthly$round(netAnnual / 12, 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
salariedBand1600000
salariedBand21200000
salariedBand32200000
salariedBand43200000
salariedBand54100000
salariedBand65600000
salariedBand77000000
salariedRate00
salariedRate10.01
salariedRate20.11
salariedRate30.2
salariedRate40.25
salariedRate50.29
salariedRate60.32
salariedRate70.35
eobiEmployeeRate0.01

Test vectors (8)

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 — N1 Rs200,000 a month: Rs2,400,000 taxable, income tax Rs156,000, EOBI Rs407

given grossMonthly200000
given annualBonus0
given eobiInsuredyes
given eobiMinimumWage40700
expect grossAnnual2400000
expect incomeTaxAnnual156000
expect incomeTaxMonthly13000
expect eobiMonthly407
expect netMonthly186593

Case 2 — N1b Rs200,000 a month: net for the year

given grossMonthly200000
given annualBonus0
given eobiInsuredyes
given eobiMinimumWage40700
expect netAnnual2239116

Case 3 — N2 Rs50,000 a month: Rs600,000 does not exceed the nil band

given grossMonthly50000
given annualBonus0
given eobiInsuredyes
given eobiMinimumWage40700
expect incomeTaxAnnual0
expect netAnnual595116

Case 4 — N3 Rs100,000 a month: 1% of the Rs600,000 above Rs600,000 = Rs6,000

given grossMonthly100000
given annualBonus0
given eobiInsuredyes
given eobiMinimumWage40700
expect incomeTaxAnnual6000

Case 5 — N4 Rs150,000 a month and a Rs300,000 bonus: Rs6,000 + 11% of Rs900,000 = Rs105,000

given grossMonthly150000
given annualBonus300000
given eobiInsuredyes
given eobiMinimumWage40700
expect grossAnnual2100000
expect incomeTaxAnnual105000

Case 6 — N5 Rs7,000,000 for the year: the table’s Rs1,424,000 at the top band edge

given grossMonthly500000
given annualBonus1000000
given eobiInsuredyes
given eobiMinimumWage40700
expect incomeTaxAnnual1424000

Case 7 — N6 Rs1,000,000 a month: Rs1,424,000 + 35% of Rs5,000,000, no surcharge on salary

given grossMonthly1000000
given annualBonus0
given eobiInsuredyes
given eobiMinimumWage40700
expect incomeTaxAnnual3174000

Case 8 — N7 not insured with EOBI: no contribution

given grossMonthly200000
given annualBonus0
given eobiInsuredno
given eobiMinimumWage40700
expect eobiMonthly0
expect netAnnual2244000

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 salary after tax calculator

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