Skip to content

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.

Notifications You must be signed in to change notification settings

munajunaideen/Zakat_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages