Sales tax
import { getSalesTaxRate, calculateSalesTax, splitInclusive } from 'pakdatakit/salestax'
Sales tax on goods is federal (FBR). Sales tax on services is provincial: PRA in Punjab, SRB in Sindh, KPRA in Khyber Pakhtunkhwa, BRA in Balochistan, and the federal ICT tax in Islamabad. Each rate carries the law and source it comes from.
Rs. 180 sales tax at 18%, Rs. 1,180 in total
- Authority
- FBR
- Rate today
- 18%
- Sales tax
- Rs. 180
- Total
- Rs. 1,180
Examples
Section titled “Examples”import { getSalesTaxRate, calculateSalesTax, splitInclusive } from 'pakdatakit';
getSalesTaxRate({ kind: 'services', province: 'Punjab', date: '2026-11-18' });// → {// "kind": "services",// "authority": "PRA",// "province": "Punjab",// "rate": 16,// "from": "2019-07-01",// "to": null,// "law": "Punjab Sales Tax on Services Act 2012, s. 2(41A) and Second Schedule",// "source": "https://pra.punjab.gov.pk/Downloads/THE-PUNJAB-SALES-TAX-ON-SERVICES-ACT-2012-17th-Edition-2026-2027.pdf"// }
calculateSalesTax(1000, { kind: 'goods', date: '2026-11-18' });// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }
calculateSalesTax(1150, { province: 'Sindh', kind: 'services', date: '2026-11-18', inclusive: true });// → {// "net": 1000,// "tax": 150,// "gross": 1150,// "rate": 15// }
splitInclusive(1180, 18);// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }from pakdatakit import get_sales_tax_rate, calculate_sales_tax, split_inclusive
get_sales_tax_rate(kind='services', province='Punjab', date='2026-11-18')# → {# "kind": "services",# "authority": "PRA",# "province": "Punjab",# "rate": 16,# "from": "2019-07-01",# "to": None,# "law": "Punjab Sales Tax on Services Act 2012, s. 2(41A) and Second Schedule",# "source": "https://pra.punjab.gov.pk/Downloads/THE-PUNJAB-SALES-TAX-ON-SERVICES-ACT-2012-17th-Edition-2026-2027.pdf"# }
calculate_sales_tax(1000, kind='goods', date='2026-11-18')# → {# "net": 1000,# "tax": 180,# "gross": 1180,# "rate": 18# }
calculate_sales_tax(1150, province='Sindh', kind='services', date='2026-11-18', inclusive=True)# → {# "net": 1000,# "tax": 150,# "gross": 1150,# "rate": 15# }
split_inclusive(1180, 18)# → {# "net": 1000,# "tax": 180,# "gross": 1180,# "rate": 18# }import 'package:pakdatakit/pakdatakit.dart';
getSalesTaxRate(kind: SalesTaxKind.services, province: 'Punjab', date: '2026-11-18');// → {// "kind": "services",// "authority": "PRA",// "province": "Punjab",// "rate": 16,// "from": "2019-07-01",// "to": null,// "law": "Punjab Sales Tax on Services Act 2012, s. 2(41A) and Second Schedule",// "source": "https://pra.punjab.gov.pk/Downloads/THE-PUNJAB-SALES-TAX-ON-SERVICES-ACT-2012-17th-Edition-2026-2027.pdf"// }
calculateSalesTax(1000, kind: SalesTaxKind.goods, date: '2026-11-18');// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }
calculateSalesTax(1150, province: 'Sindh', kind: SalesTaxKind.services, date: '2026-11-18', inclusive: true);// → {// "net": 1000,// "tax": 150,// "gross": 1150,// "rate": 15// }
splitInclusive(1180, 18);// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }using PakDataKit;
SalesTax.GetRate(new SalesTaxRateQuery { Kind = SalesTaxKind.Services, Province = "Punjab", Date = "2026-11-18" });// → {// "kind": "services",// "authority": "PRA",// "province": "Punjab",// "rate": 16,// "from": "2019-07-01",// "to": null,// "law": "Punjab Sales Tax on Services Act 2012, s. 2(41A) and Second Schedule",// "source": "https://pra.punjab.gov.pk/Downloads/THE-PUNJAB-SALES-TAX-ON-SERVICES-ACT-2012-17th-Edition-2026-2027.pdf"// }
SalesTax.Calculate(1000, new SalesTaxOptions { Kind = SalesTaxKind.Goods, Date = "2026-11-18" });// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }
SalesTax.Calculate(1150, new SalesTaxOptions { Province = "Sindh", Kind = SalesTaxKind.Services, Date = "2026-11-18", Inclusive = true });// → {// "net": 1000,// "tax": 150,// "gross": 1150,// "rate": 15// }
SalesTax.SplitInclusive(1180, 18);// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }use PakDataKit\SalesTax;
SalesTax::getRate(['kind' => 'services', 'province' => 'Punjab', 'date' => '2026-11-18']);// → {// "kind": "services",// "authority": "PRA",// "province": "Punjab",// "rate": 16,// "from": "2019-07-01",// "to": null,// "law": "Punjab Sales Tax on Services Act 2012, s. 2(41A) and Second Schedule",// "source": "https://pra.punjab.gov.pk/Downloads/THE-PUNJAB-SALES-TAX-ON-SERVICES-ACT-2012-17th-Edition-2026-2027.pdf"// }
SalesTax::calculate(1000, ['kind' => 'goods', 'date' => '2026-11-18']);// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }
SalesTax::calculate(1150, ['province' => 'Sindh', 'kind' => 'services', 'date' => '2026-11-18', 'inclusive' => true]);// → {// "net": 1000,// "tax": 150,// "gross": 1150,// "rate": 15// }
SalesTax::splitInclusive(1180, 18);// → {// "net": 1000,// "tax": 180,// "gross": 1180,// "rate": 18// }Reference
Section titled “Reference”getSalesTaxRate()
Section titled “getSalesTaxRate()”function getSalesTaxRate(query: { kind: 'goods' | 'services'; province?: string; // required for services date?: string | Date; // default: today}): SalesTaxRate | null;Returns the standard rate in force on that date, with authority, rate, from, to, law and source.
Caveats. Returns null for dates before 1 July 2019, unknown provinces, services without a province, or goods in Azad Jammu and Kashmir or Gilgit-Baltistan. Standard rates only: reduced rates, exemptions, the Third Schedule and further tax are not covered.
calculateSalesTax()
Section titled “calculateSalesTax()”function calculateSalesTax( amount: number, options: { rate?: number; province?: string; kind?: 'goods' | 'services'; date?: string | Date; inclusive?: boolean; },): SalesTaxAmounts | null; // { net, tax, gross, rate }Returns the net amount, tax and gross amount in whole paisa. With inclusive: true, amount already includes tax and is split.
splitInclusive()
Section titled “splitInclusive()”function splitInclusive(gross: number, rate: number): SalesTaxAmounts | null;Returns the net and tax parts of a tax-inclusive amount at a given rate.
Related: the sales tax calculator, FBR digital invoicing.