Skip to content

jssuthahar/malaysiatax

Repository files navigation

πŸ‡²πŸ‡Ύ Malaysia Tax Calculator (Flutter Web)

Fast, Accurate, and Simple Malaysia Income Tax Estimator for Locals & Foreigners

This open-source Flutter Web Malaysia Tax Calculator helps you instantly estimate your monthly and yearly Malaysian income tax, whether you are a Malaysian resident or foreigner working in Malaysia.

It supports progressive resident tax brackets, non-resident flat tax rules, and provides a clean UI with monthly breakdowns and net salary calculations.

πŸ”— Live App: https://jssuthahar.github.io/malaysiatax/ πŸ“Ί YouTube: https://www.youtube.com/@NikiBhavi


🌟 Why This Tax Calculator?

Many peopleβ€”locals, expats, tourists, new workersβ€”struggle to calculate Malaysian tax correctly. To make things simple, I created this free tax calculator website that helps you:

βœ” Understand Malaysia income tax rules βœ” Calculate tax for locals and foreigners βœ” Estimate take-home salary βœ” Learn about resident vs non-resident tax βœ” View Malaysia's latest tax brackets

Please share this tool with your friends if they plan to work or move to Malaysia. πŸ‡²πŸ‡Ύ Your support for NikiBhavi Vlog means a lot! πŸ™


πŸš€ Malaysia Tax Calculator β€” Key Features

1️⃣ Income Tax Calculation

Supports the complete Malaysian income tax system:

  • Residents β†’ Progressive tax brackets

  • Foreigners β†’ Non-resident flat rate (first 182 days), then progressive

  • Monthly and annual:

    • Tax payable
    • Total salary
    • Net income
    • Effective tax rate

2️⃣ Interactive UI (Flutter Web)

  • Clean dashboard
  • YouTube banner promoting NikiBhavi channel
  • Button navigation to Calculator
  • Color-coded monthly breakdowns
  • Fully responsive design

3️⃣ Malaysia Tax Rules Preview

Includes a simple preview of:

  • Resident tax brackets
  • Non-resident tax rate
  • Easy JSON-based configuration for future updates

4️⃣ User Inputs

  • Monthly salary (MYR)
  • Year of calculation
  • Resident/Foreigner selection
  • Arrival date (for foreigners)

5️⃣ Important Disclaimer

This tool provides estimated tax values. Always verify with the official LHDN Malaysia πŸ‘‰ https://www.hasil.gov.my


πŸ–₯️ Screenshots


🌐 Live Demo

πŸ‘‰ Use the Malaysia Tax Calculator https://jssuthahar.github.io/malaysiatax/


πŸ’› Support My Work

Buy Me a Coffee

πŸ“Ί Watch & Support: NikiBhavi Vlog – https://www.youtube.com/@NikiBhavi


πŸ“¦ Project Structure

malaysia_tax_calculator/
β”‚
β”œβ”€ lib/
β”‚   β”œβ”€ main.dart
β”‚   β”œβ”€ home_page.dart         # Home page with YouTube banner & tax overview
β”‚   β”œβ”€ calculator_page.dart   # Tax calculation logic & UI
β”‚   └─ tax_config.dart        # Load tax brackets & non-resident rate
β”‚
β”œβ”€ assets/
β”‚   └─ tax_rules.json         # Editable tax rules for Malaysia
β”‚
β”œβ”€ pubspec.yaml
β”œβ”€ README.md
└─ web/
    └─ index.html             # Flutter Web entry point

πŸ› οΈ Installation & Setup

1. Clone this repository

git clone <your-repo-url>
cd malaysia_tax_calculator

2. Install dependencies

flutter pub get

3. Run the app in browser

flutter run -d chrome

4. Build for production

flutter build web

Output will be generated in build/web/ β†’ ready for GitHub Pages hosting.


πŸ“ Tax Rules JSON (Editable)

assets/tax_rules.json

{
  "malaysia": {
    "non_resident_rate": 0.30,
    "resident_brackets": [
      { "limit": 5000, "rate": 0.01 },
      { "limit": 20000, "rate": 0.03 },
      { "limit": 35000, "rate": 0.08 },
      { "limit": 50000, "rate": 0.13 },
      { "limit": 70000, "rate": 0.21 },
      { "limit": 100000, "rate": 0.24 },
      { "limit": 250000, "rate": 0.24 },
      { "limit": 400000, "rate": 0.25 },
      { "limit": 600000, "rate": 0.26 },
      { "limit": 1000000, "rate": 0.28 },
      { "limit": "infinity", "rate": 0.30 }
    ]
  }
}

πŸ“˜ How to Use the Calculator

β–Ά On Home Page

  • View NikiBhavi YouTube banner
  • View Malaysia tax bracket summary
  • Click Start Calculation

β–Ά On Calculator Page

  1. Enter your monthly salary

  2. Choose year

  3. Select:

    • Local resident
    • Foreigner
  4. If foreigner β†’ enter arrival date

  5. Click Calculate

  6. View:

    • Monthly tax
    • Total tax
    • Total salary
    • Net income
    • Effective tax %

ℹ️ Important Notes

  • Foreigners pay 30% flat for first 182 days.
  • After crossing 182 days β†’ switch to resident tax (progressive).
  • JSON tax rules allow quick tax updates without app modifications.
  • All results are estimates only.
  • Always refer to LHDN Malaysia for final confirmation.

πŸ“¦ Dependencies (pubspec.yaml)

dependencies:
  flutter:
    sdk: flutter
  url_launcher: ^6.2.1

πŸ“„ License

MIT License Β© Suthahar Jegatheesan