The Zakat Calculator is a bilingual (English + Arabic) Streamlit web app that helps users accurately calculate their annual Zakat according to Islamic principles.
It provides an intuitive interface for manually entering assets and liabilities, automatically computes Zakat eligibility, and generates a downloadable PDF report.
๐ก This version focuses on non-AI features โ data is entered manually rather than extracted from uploaded files.
| Feature | Description |
|---|---|
| ๐ Multilingual UI | English and Arabic interface with a sidebar language switch |
| โฉ๏ธ Right-to-Left Support | Full RTL layout for Arabic mode |
| ๐ฐ Accurate Zakat Computation | Calculates 2.5% of zakatable wealth if above the Nisab threshold |
| ๐งฎ Nisab Calculation | Based on 85 g of gold ร current gold price (user-defined) |
| ๐ Wealth Composition Chart | Visualizes assets (cash, gold, investments, etc.) using Matplotlib |
| ๐งพ PDF Report Export | Generates a downloadable Unicode-safe report using the Amiri font |
| ๐ง Error-Safe Input | Handles empty or invalid values gracefully (no NaN conversion errors) |
[ \text{Zakatable Wealth} = \text{Total Assets} - \text{Liabilities} ]
[ \text{Nisab} = 85 \text{g of gold} ร \text{Current Gold Price} ]
[ \text{Zakat Due} = 2.5% ร \text{Zakatable Wealth} ]
- Python 3.10+
- Streamlit โ Web framework for interactive dashboards
- Pandas โ Data management and calculations
- Matplotlib โ Data visualization
- fpdf2 โ Unicode-enabled PDF generation
- Amiri Arabic Font โ For Arabic report text
git clone https://github.com/<yourusername>/zakat-calculator.git
cd zakat-calculator
### 2๏ธโฃ Install dependencies
```bash
Copy code
pip install streamlit pandas matplotlib fpdf2
### 3๏ธโฃ Add Arabic font
Download Amiri-Regular.ttf from
๐ Google Fonts โ Amiri
and place it in the same folder as your Python file.
### 4๏ธโฃ Run the app
bash
Copy code
streamlit run zakat_calculator_final.py
### ๐ฅ๏ธ Usage
Choose your preferred language from the sidebar.
Enter your assets (cash, gold, investments, etc.) and liabilities.
Specify the current gold price per gram.
The app will:
โ
Calculate total assets and zakatable wealth
โ
Check eligibility against Nisab
โ
Display results and wealth composition chart
โ
Allow you to download a PDF report
### ๐ Output Example
Report Includes:
Total assets and liabilities
Net zakatable wealth
Nisab threshold
Zakat due
Date of calculation
#Islamic note of blessing ๐คฒ
### ๐ธ Screenshot (Optional)
Add a screenshot here showing both English and Arabic interfaces.
### ๐ค Contributing
Feel free to fork this repository and enhance it!
๐ก Ideas for improvement
๐ Automatic gold price retrieval via API
๐
Multi-year Zakat tracking
๐๏ธ Secure database for user history
๐งญ License
This project is open-source under the MIT License.
๐ Author
Mohamed Munawfer Junaideen
๐ Qatar
๐ผ Specializing in Islamic finance digital solutions and data-driven tools