cd /news/artificial-intelligence/how-ai-is-quietly-changing-the-way-p… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-21253] src=dev.to pub= topic=artificial-intelligence verified=true sentiment=Β· neutral

How AI Is Quietly Changing the Way Pakistanis Think About Taxes

A developer has built an AI-powered tax assistant for Pakistan's freelancers and salaried employees, addressing the country's 9-10% tax-to-GDP ratio by simplifying the complex Income Tax Ordinance 2001. The tool uses large language models to translate dense legal text into plain Urdu or English with practical examples, and includes a conversational AI that answers specific tax questions about withholding rates, capital gains, and filing requirements. The project also provides clean, auditable code for calculating progressive income tax slabs, replacing vague blog posts with interactive, accessible financial literacy tools.

read6 min publishedJun 4, 2026

The issue isn't just evasion or corruption (though those exist). The deeper problem is comprehension. A massive chunk of Pakistan's working population β€” freelancers, salaried employees, small business owners β€” simply doesn't understand what they owe, why they owe it, or how to calculate it.

FBR's own portal can feel like it was designed to discourage compliance. Tax slabs change every budget. Withholding tax rules differ by transaction type. And the moment someone earns foreign remittance income, the rules bifurcate depending on whether they're a filer or non-filer.

This is where AI β€” and frankly, developers who understand both code and tax logic β€” can make a real difference.

Before we talk about AI tools, it's worth sitting with this number: Pakistan's tax-to-GDP ratio hovers around 9–10%, one of the lowest in the region. Compare that to India (~11%), Bangladesh (~10.5%), or the global average of ~15%.

The government's usual response is enforcement β€” more audits, more penalties, broader withholding nets. But enforcement against people who genuinely don't understand what they owe is a blunt instrument.

What's missing is accessible financial literacy at the point of decision.

When a freelancer on Upwork earns $500 this month, they should be able to answer:

None of these answers are obvious. They require reading through FBR circulars, Gazette notifications, and budget documents that are not written for humans.

Let's be specific, because "AI will fix taxes" is the kind of vague claim that sounds good and means nothing.

Here's where AI genuinely helps:

Pakistan's Income Tax Ordinance 2001 has been amended dozens of times. The actual legal text is dense, reference-heavy, and assumes familiarity with prior sections.

AI language models are remarkably good at summarizing legal text into plain Urdu or English. A developer can build a simple tool that takes a section of the Ordinance, sends it to an LLM with a structured prompt, and returns a plain-language explanation with an example.

prompt = """
You are a Pakistani tax expert. Explain the following section of the 
Income Tax Ordinance in simple English, with a practical example for 
a freelancer or salaried employee. Avoid jargon.

Section: {ordinance_text}
"""

This alone β€” a searchable, AI-summarized version of the ITO β€” would be more useful than most existing resources.

Pakistan's income tax slabs change every year in the Finance Act. But the structure of the calculation is consistent: progressive slabs, a fixed tax + marginal rate above a threshold.

Here's what the FY2024-25 slab structure looks like in code for salaried individuals:

function calculateIncomeTax(annualIncome) {
  const slabs = [
    { min: 0,         max: 600000,    fixedTax: 0,      rate: 0.00 },
    { min: 600001,    max: 1200000,   fixedTax: 0,      rate: 0.05 },
    { min: 1200001,   max: 2200000,   fixedTax: 30000,  rate: 0.15 },
    { min: 2200001,   max: 3200000,   fixedTax: 180000, rate: 0.25 },
    { min: 3200001,   max: 4100000,   fixedTax: 430000, rate: 0.30 },
    { min: 4100001,   max: Infinity,  fixedTax: 700000, rate: 0.35 },
  ];

  for (const slab of slabs) {
    if (annualIncome >= slab.min && annualIncome <= slab.max) {
      return slab.fixedTax + (annualIncome - slab.min) * slab.rate;
    }
  }
}

Clean, readable, auditable. The problem is most people accessing tax information online aren't getting this β€” they're getting vague blog posts with outdated numbers and no interactive element.

The most powerful application is conversational. Instead of building a hundred different calculators, you build one AI assistant that understands Pakistani tax context and can answer questions like:

"I'm a salaried person earning PKR 80,000/month. My employer deducts tax. Do I still need to file a return?"

"I sold a plot in DHA last year. What capital gains tax applies?"

"I'm a non-filer. What WHT rate applies to my cash withdrawal from HBL?"

The key engineering challenge here isn't the AI β€” it's the context layer. LLMs hallucinate confidently. For tax queries, that's dangerous. The right architecture is Retrieval-Augmented Generation (RAG):

The key engineering challenge here isn't the AI β€” it's the context layer. LLMs hallucinate confidently. For tax queries, that's dangerous. The right architecture is Retrieval-Augmented Generation (RAG):

User query
    ↓
Semantic search over verified FBR documents / Finance Acts
    ↓
Retrieve top-k relevant chunks
    ↓
LLM generates response grounded in those chunks
    ↓
Response includes source citation

This grounds the AI in actual regulatory text, reduces hallucination, and builds user trust.

One of the most misunderstood aspects of Pakistani taxation is the Active Taxpayer List (ATL) and what it actually means financially.

Non-filers pay significantly higher withholding tax rates across dozens of transactions:

The delta is real money. Yet most people don't file because they assume filing means paying more β€” when actually, for many salaried individuals, filing just formalizes taxes already withheld, and makes them eligible for lower WHT rates on everything else.

An AI tool that could model: "Here's how much extra you're paying annually as a non-filer based on your estimated transaction pattern" β€” would be genuinely revelatory for a lot of people.

Accountants understand the rules. Lawyers can read the Ordinance. But only developers can:

The opportunity isn't building the next FBR portal. It's building the layer between the citizen and the complexity β€” calculators, explainers, scenario modelers, and eventually AI assistants that make compliance feel less like punishment and more like information.

Pakistan's developer community is large, talented, and increasingly building for local problems. Tax tools are one of the highest-leverage verticals available: everyone has a tax situation, the existing tooling is terrible, and the knowledge gap is enormous.

If you're thinking about building in this space, here's a rough quality bar:

Minimum viable: A clean income tax calculator with current slabs, mobile-friendly, that clearly explains the result in plain language.

Good: Adds filer vs. non-filer comparison, handles both salaried and business income, includes a Zakat deduction field.

Excellent: RAG-based AI assistant grounded in FBR documents, can answer follow-up questions, cites sources, updates automatically when Finance Act changes.

Exceptional: Connects to IRIS data via API (if FBR ever opens one), allows return filing guidance, integrates withholding tax certificate parsing.

Most of the space between "minimum viable" and "good" is currently unoccupied.

The boring truth about financial technology in emerging markets is that the biggest gains often come not from fancy ML models or blockchain infrastructure β€” but from simply making existing, public information accessible and interactive.

Pakistan's tax code is public. FBR's slabs are public. The Finance Acts are public. The knowledge is there. What's missing is the interface.

If you're a developer sitting on the fence about whether a Pakistani tax tool is "worth building" β€” the answer is yes, and the gap is larger than it looks from the outside.

Have you built something in the fintech or govtech space in Pakistan? Drop a comment β€” would love to see what others are working on.

── more in #artificial-intelligence 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/how-ai-is-quietly-ch…] indexed:0 read:6min 2026-06-04 Β· β€”