Published on

Building a Bangladesh tax calculator after a costly 2020 tax bill

Building a Bangladesh tax calculator after a costly 2020 tax bill
Authors
On this page

In 2020 I got a tax bill that was a lot bigger than I expected. The reason was simple: I didn't know Bangladesh's tax rebate schemes existed.

That bill sent me off to learn how the system really works. Then I built the Bangladesh Tax Calculator, the tool I wish I'd had that year.

Why the math trips people up

If you're an employee in Bangladesh, you've probably felt this. There are tax slabs, rebate schemes and investment quotas. The trap is that they all interact, so working out what you owe is harder than it should be.

That confusion often means people overpay, or miss savings that the law already gives them through rebates.

The engine starts from the baseline individual slab progression:

Annual Income Bracket (BDT)Tax RateMax Tax for Slab
First 350,0000%0
Next 100,0005%5,000
Next 300,00010%30,000
Next 400,00015%60,000
Next 500,00020%100,000
Balance25%Variable
Bar chart of the Bangladesh slab staircase: 0% on the first 350,000 BDT, then 5%, 10%, 15%, 20% and 25% on the balance.

Then the rebate. This function works out the credit you can take against your gross tax:

export function calculateRebate(taxableIncome: number, investment: number): number {
  // Allowable investment capped at 20% of taxable income or 1,000,000 BDT
  const eligibleInvestment = Math.min(investment, taxableIncome * 0.2, 1000000)
  return Math.round(eligibleInvestment * 0.15) // 15% investment tax credit
}

Three caps, one Math.min. Your eligible investment is the smallest of what you invested, 20% of taxable income, or 1,000,000 BDT. You get 15% of that back as a credit against your tax.

What it does today

The calculator has grown over the years to keep up with Bangladesh's changing rules:

  • Year-wise updates: it keeps the historical rules from 2020 onwards, so you can calculate tax for different fiscal years.
  • Dynamic tax slabs: pick a fiscal year and the slabs and rates switch to match.
  • Investment quota calculations: it factors your investment quota in, so you can see how to save on tax.
  • Simple interface: plain input forms, no accounting knowledge needed.

Keeping up with a moving target

Bangladesh's tax rules change every year. The changes usually land in three places:

  • Tax slab rates and thresholds
  • Investment quota limits
  • Rebate percentages and conditions

I update the calculator to reflect these changes across multiple fiscal years.

Note: The calculator is updated periodically. Check the GitHub repository for the latest supported fiscal year.

What I might add next

A few ideas I'm considering:

  • Special tax calculation support for elderly citizens
  • Dedicated features for women taxpayers
  • Tax computation adjustments for differently-abled individuals
  • Deeper tax planning tools

What it's become

It started as a personal tool. Now it helps employees in Bangladesh understand what they owe, plan investments for a better tax outcome, and make more informed money decisions.

Takeaways

  • If you're a salaried taxpayer in Bangladesh, check the rebate rules for your fiscal year before you file. That's the lesson my 2020 bill taught me.
  • Tax rules that change every year are a good fit for code that keeps each year's rules side by side.
  • A gap in your own knowledge is a decent place to start a project.

The project is open source and contributions are welcome. As the rules keep changing, the calculator will keep up.


Resources