How the Pakistan sales tax calculator is verified

Inputs

InputFieldType
Amount (PKR)amountnumber
This amount isdirectionstring
What is being suppliedcategorystring
Buyer is not registered or not on the active taxpayers’ list (4% further tax)unregisteredBuyerboolean
Goods notified under s.3(3A) — the buyer pays the taxreverseChargeboolean
Annual turnover of a manufacturer (PKR)annualTurnovernumber
Has an industrial gas or electricity connectionindustrialConnectionboolean
Located in a residential arearesidentialAreaboolean
Labour force of more than ten workersoverTenWorkersboolean

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)
Raterate(category = 'standard' ? $const.salesTaxRate : $const.zeroRate) + ((unregisteredBuyer and category != 'export') ? $const.furtherTaxRate : 0)
Effective RateeffectiveRatereverseCharge ? 0 : $round(rate, 4)
Value (excluding tax)netAmountdirection = 'remove' ? $round(amount / (1 + effectiveRate), 2) : $round(amount, 2)
of which further tax 4%furtherTax(unregisteredBuyer and category != 'export' and $not(reverseCharge)) ? $round(netAmount * $const.furtherTaxRate, 2) : 0
Sales tax chargedvatAmount$round(netAmount * effectiveRate, 2)
Sales tax paid by the buyer (s.3(3A))selfAssessedVatreverseCharge ? $round(netAmount * (category = 'standard' ? $const.salesTaxRate : $const.zeroRate), 2) : 0
GrossgrossAmount$round(netAmount + vatAmount, 2)
Manufacturer must registermustRegister$n(annualTurnover) > $const.cottageTurnoverLimit or industrialConnection or $not(residentialArea) or overTenWorkers

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
salesTaxRate0.18
zeroRate0
furtherTaxRate0.04
cottageTurnoverLimit8000000

Test vectors (11)

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 — V1 Rs100,000 of taxable goods: 18% = Rs18,000

given amount100000
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect vatAmount18000
expect grossAmount118000
expect effectiveRate0.18

Case 2 — V2 Rs118,000 including tax back to Rs100,000

given amount118000
given directionremove
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect netAmount100000
expect vatAmount18000

Case 3 — V3 to an unregistered buyer: 18% + 4% further tax = Rs22,000

given amount100000
given directionadd
given categorystandard
given unregisteredBuyeryes
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect rate0.22
expect furtherTax4000
expect vatAmount22000
expect grossAmount122000

Case 4 — V4 an export is zero-rated

given amount100000
given directionadd
given categoryexport
given unregisteredBuyerno
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect vatAmount0
expect grossAmount100000

Case 5 — V4b an export to an unregistered buyer abroad: no further tax

given amount100000
given directionadd
given categoryexport
given unregisteredBuyeryes
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect furtherTax0
expect vatAmount0

Case 6 — V4c Fifth Schedule goods to an unregistered buyer: s.4 keeps the 4% further tax

given amount100000
given directionadd
given categoryfifthSchedule
given unregisteredBuyeryes
given reverseChargeno
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect rate0.04
expect furtherTax4000
expect vatAmount4000

Case 7 — V5 goods notified under s.3(3A): the seller charges none, the buyer pays Rs18,000

given amount100000
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeyes
given annualTurnover0
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect vatAmount0
expect grossAmount100000
expect selfAssessedVat18000

Case 8 — V6 Rs8 million of turnover is still a cottage industry (“does not exceed”)

given amount100
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover8000000
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect mustRegisterfalse

Case 9 — V7 above Rs8 million a manufacturer must register

given amount100
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover8000001
given industrialConnectionno
given residentialAreayes
given overTenWorkersno
expect mustRegistertrue

Case 10 — V8 under Rs8 million but with an industrial electricity connection: not a cottage industry, must register

given amount100
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover1000000
given industrialConnectionyes
given residentialAreayes
given overTenWorkersno
expect mustRegistertrue

Case 11 — V9 more than ten workers fails s.2(5AB)(c)

given amount100
given directionadd
given categorystandard
given unregisteredBuyerno
given reverseChargeno
given annualTurnover1000000
given industrialConnectionno
given residentialAreayes
given overTenWorkersyes
expect mustRegistertrue

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 sales tax calculator

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