Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🕌 Zakat Calculator (Streamlit App)

🌟 Overview

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.


✨ Features

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)

🧮 Calculation Logic

🏦 Zakatable Wealth

[ \text{Zakatable Wealth} = \text{Total Assets} - \text{Liabilities} ]

⚖️ Nisab Threshold

[ \text{Nisab} = 85 \text{g of gold} × \text{Current Gold Price} ]

💰 Zakat Due (if eligible)

[ \text{Zakat Due} = 2.5% × \text{Zakatable Wealth} ]


🧱 Technologies Used

  • 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

⚙️ Installation

1️⃣ Clone the repository

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

About

A bilingual (English + Arabic) Streamlit web app that helps users calculate their annual Zakat accurately according to Islamic principles. It allows users to manually enter assets and liabilities, computes Zakat eligibility, and generates a downloadable PDF report in both languages with right-to-left (RTL) Arabic support.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages