A comprehensive web application that helps Muslims calculate their zakat easily and accurately according to Islamic law. Built with modern web technologies and designed for global accessibility.
- Gold Zakat: Calculate zakat on gold with nisab of 85 grams
- Silver Zakat: Calculate zakat on silver with nisab of 595 grams
- Wealth Zakat: Calculate zakat on cash, savings, deposits, and investments
- Income Zakat: Calculate zakat on monthly salary and income
- Display relevant Quranic verses and authentic hadiths for each zakat type
- Arabic text with English translations
- Proper source citations (Quran chapters/verses, Hadith collections)
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Real-time Calculations: Instant results with detailed breakdowns
- Privacy-First: All calculations performed locally in browser
- Accessibility: WCAG compliant design with proper contrast and navigation
- Open Source: MIT licensed with full source code available
- Modular Architecture: Clean separation of concerns
- JSON-Based Configuration: Easy to modify zakat data and rules
- TypeScript Support: Type-safe development experience
- Node.js (version 18 or newer)
- npm or yarn package manager
-
Clone the repository:
git clone https://github.com/MauCariApa-com/zakat-calculator.git cd zakat-calculator
-
Install dependencies:
npm install # or yarn install
-
Start development server:
npm run dev # or yarn dev
-
Open in browser:
http://localhost:4321
-
Development server:
npm run dev
-
Production build:
npm run build
-
Preview production build:
npm run preview
- Astro - Modern web framework for building fast, content-focused websites
- TypeScript - JavaScript with type safety
- Tailwind CSS - Utility-first CSS framework
- HTML5 & CSS3 - Modern web standards
- ESLint & Prettier - Code quality and formatting
- Vite - Fast build tool and development server
- Static Site Generation - Pre-built for optimal performance
- CDN Ready - Can be deployed to any static hosting service
- Nisab: 85 grams
- Rate: 2.5%
- Condition: Owned for 1 full year (haul)
- Formula:
(Gold Weight Γ Gold Price) Γ 2.5%
- Nisab: 595 grams
- Rate: 2.5%
- Condition: Owned for 1 full year (haul)
- Formula:
(Silver Weight Γ Silver Price) Γ 2.5%
- Nisab: Equivalent to 85 grams of gold
- Rate: 2.5%
- Includes: Cash, savings, deposits, investments
- Condition: Owned for 1 full year (haul)
- Formula:
Total Wealth Γ 2.5%
- Nisab: Equivalent to 85 grams of gold per month
- Rate: 2.5%
- Includes: Salary, bonuses, allowances, other halal income
- Condition: Paid monthly when receiving income
- Formula:
Monthly Income Γ 2.5%
zakat-calculator/
βββ src/
β βββ components/ # Reusable UI components
β β βββ ZakatEmasCard.astro # Gold zakat calculator
β β βββ ZakatPerakCard.astro # Silver zakat calculator
β β βββ ZakatMalCard.astro # Wealth zakat calculator
β β βββ ZakatPenghasilanCard.astro # Income zakat calculator
β β βββ DalilEmasCard.astro # Gold zakat evidence
β β βββ DalilPerakCard.astro # Silver zakat evidence
β β βββ DalilMalCard.astro # Wealth zakat evidence
β β βββ DalilPenghasilanCard.astro # Income zakat evidence
β β βββ FAQ.astro # Frequently asked questions
β βββ content/ # Data and content files
β β βββ zakat/ # Zakat configuration data
β β β βββ gold.json # Gold zakat rules and form inputs
β β β βββ silver.json # Silver zakat rules and form inputs
β β β βββ wealth.json # Wealth zakat rules and form inputs
β β β βββ income.json # Income zakat rules and form inputs
β β βββ dalil/ # Islamic evidence data
β β βββ dalil-emas-1.json # Gold zakat Quran evidence
β β βββ dalil-emas-2.json # Gold zakat Hadith evidence
β β βββ dalil-perak-1.json # Silver zakat evidence
β β βββ dalil-mal-1.json # Wealth zakat Quran evidence
β β βββ dalil-mal-2.json # Wealth zakat Hadith evidence
β β βββ dalil-penghasilan-1.json # Income zakat Quran evidence
β β βββ dalil-penghasilan-2.json # Income zakat Hadith evidence
β βββ layouts/ # Page layout templates
β β βββ Layout.astro # Main layout template
β β βββ PrivacyLayout.astro # Privacy/legal pages layout
β βββ pages/ # Application pages
β β βββ index.astro # Homepage with calculators
β β βββ about.astro # About page
β β βββ contact.astro # Contact page
β β βββ privacy-policy.astro # Privacy policy
β β βββ terms-of-service.astro # Terms of service
β βββ styles/ # CSS and styling
β βββ global.css # Global styles and imports
β βββ zakat.css # Zakat-specific component styles
βββ public/ # Static assets
β βββ favicon.svg # Site favicon
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind CSS configuration
βββ package.json # Dependencies and scripts
βββ README.md # Project documentation
All zakat rules and calculations are stored in JSON files located in src/content/zakat/
. Each file contains:
{
"title": "Gold Zakat",
"nisab": 85,
"nisabUnit": "grams",
"kadarZakat": 2.5,
"kadarZakatUnit": "percent",
"description": "Gold zakat is obligatory when...",
"calculation": "Zakat = (Gold Weight Γ Gold Price) Γ 2.5%",
"conditions": [
"Gold reaches the minimum nisab of 85 grams",
"Has been owned for one full year (haul)",
"It is stored gold, not jewelry worn daily"
],
"formInputs": [
{
"id": "goldWeight",
"label": "Gold Weight (grams)",
"type": "number",
"placeholder": "Enter gold weight in grams",
"required": true
}
],
"dalilIds": ["gold-evidence-1", "gold-evidence-2"]
}
title
: Display name for the zakat typenisab
: Minimum threshold valuenisabUnit
: Unit of measurement for nisabkadarZakat
: Zakat rate (typically 2.5%)description
: Explanatory text about this zakat typecalculation
: Formula used for calculationconditions
: Array of requirements for zakat obligationformInputs
: Form field definitions for the calculatordalilIds
: References to Islamic evidence files
Evidence files are stored in src/content/dalil/
with this structure:
{
"id": "gold-evidence-1",
"type": "quran",
"text": "ΩΩΨ§ΩΩΩΨ°ΩΩΩΩ ΩΩΩΩΩΩΨ²ΩΩΩΩ Ψ§ΩΨ°ΩΩΩΩΨ¨Ω ΩΩΨ§ΩΩΩΩΨΆΩΩΨ©Ω...",
"source": "QS. At-Taubah: 34",
"translation": "And those who hoard gold and silver..."
}
id
: Unique identifier for the evidencetype
: Either "quran" or "hadith"text
: Original Arabic textsource
: Citation (Quran chapter:verse or Hadith collection)translation
: English translation
To modify zakat calculations or add new types:
- Edit existing zakat files in
src/content/zakat/
- Update nisab values by changing the
nisab
field - Modify calculation formulas in the
calculation
field - Add new form inputs to the
formInputs
array - Update conditions in the
conditions
array
{
"nisab": 87.48, // Updated from 85
"nisabUnit": "grams",
"calculation": "Zakat = (Gold Weight Γ Gold Price) Γ 2.5%"
}
- Create new JSON file in
src/content/zakat/
- Create corresponding component in
src/components/
- Add evidence files in
src/content/dalil/
- Update main page to include the new calculator
The application uses Tailwind CSS with custom Islamic-themed colors:
// tailwind.config.mjs
colors: {
islamic: {
green: '#2e7d32',
'green-light': '#4caf50',
'green-dark': '#1b5e20',
gold: '#ffc107',
cream: '#f5f5dc',
brown: '#8d6e63'
}
}
- English: Primary language
- Arabic: Islamic evidence text
- Create language-specific JSON files for zakat data
- Add translation files for UI text
- Update components to support multiple languages
- Configure language switching in the layout
- Maintain accuracy of Islamic terminology
- Consult with Islamic scholars for religious content
- Use consistent terminology across all translations
- Test calculations with native speakers
- No server-side storage: All calculations performed in browser
- No tracking: No analytics or user tracking
- No cookies: No persistent data storage
- Open source: Full transparency of code and data handling
- Input validation: All user inputs are validated
- XSS protection: Proper sanitization of user data
- HTTPS ready: Secure transmission when deployed
- No external dependencies: Minimal attack surface
We welcome contributions from developers, Islamic scholars, and community members!
- Report calculation errors
- Fix UI/UX issues
- Improve performance
- Enhance accessibility
- Add new zakat types
- Improve calculator functionality
- Enhance user interface
- Add new languages
- Improve README and guides
- Add code comments
- Create tutorials
- Write API documentation
- Translate to local languages
- Review existing translations
- Add regional variations
- Improve Islamic terminology
- Validate zakat calculations
- Review Islamic evidence
- Suggest improvements to religious content
- Consult on new features
-
Fork the repository
git clone hhttps://github.com/MauCariApa-com/zakat-calculator.git
-
Create feature branch
git checkout -b feature/new-feature-name
-
Make your changes
- Follow existing code style
- Add tests if applicable
- Update documentation
-
Test your changes
npm run dev npm run build
-
Commit and push
git commit -m "Add: new feature description" git push origin feature/new-feature-name
-
Create Pull Request
- Describe your changes
- Reference any related issues
- Request review from maintainers
- TypeScript: Use proper typing
- Components: Keep components focused and reusable
- Naming: Use descriptive names for variables and functions
- Comments: Add comments for complex logic
- Formatting: Use Prettier for consistent formatting
- Accuracy: Ensure all Islamic content is accurate
- Sources: Provide proper citations for all evidence
- Consultation: Consult with qualified scholars
- Respect: Maintain respectful tone and proper terminology
- Al-Quran: Direct verses related to zakat obligations
- Authentic Hadiths: Sahih Bukhari, Sahih Muslim, and other collections
- Classical Fiqh: Works of recognized Islamic scholars
- Contemporary Fatwas: Modern scholarly opinions
- Nisab Values: Based on traditional Islamic measurements
- Haul Requirement: One lunar year ownership period
- Rate Calculation: 2.5% (1/40th) as prescribed in Islamic law
- Modern Applications: Adapted for contemporary financial instruments
This application's calculations have been developed with reference to:
- Classical Islamic jurisprudence texts
- Modern Islamic finance principles
- Contemporary scholarly consensus
- Regional Islamic authorities
This project is licensed under the MIT License - see the LICENSE file for details.
- β Commercial use allowed
- β Modification allowed
- β Distribution allowed
- β Private use allowed
- β License and copyright notice required
- β No warranty provided
- Email: info@zakatcalculator.com
- Support: support@zakatcalculator.com
- GitHub: https://github.com/username/zakat-calculator
- Issues: Report bugs and request features
- Discussions: Community discussions and questions
- Scholarly Review: For Islamic law questions
- Content Validation: For religious content accuracy
- Regional Adaptations: For local Islamic practices
- Contributors: See CONTRIBUTORS.md
- Acknowledgments: Thanks to all who have helped
- Feedback: We value your input and suggestions
- Thanks to all scholars who provided guidance on zakat calculations
- Appreciation for those who reviewed the Islamic content
- Gratitude for ongoing consultation and support
- Thanks to all contributors who have improved this application
- Appreciation for bug reports and feature suggestions
- Gratitude for translations and documentation improvements
- Astro Team: For the excellent web framework
- Tailwind CSS: For the utility-first CSS framework
- TypeScript Team: For type-safe development tools
Made with β€οΈ for Muslims worldwide
"And establish prayer and give zakat and bow with those who bow [in worship and obedience]." - Quran 2:43
- v1.0.0 - Initial release with basic zakat calculators
- v1.1.0 - Added Islamic evidence integration
- v1.2.0 - Enhanced UI/UX and mobile responsiveness
- v1.3.0 - Added comprehensive documentation
- Current - Ongoing improvements and community contributions
- Multi-language support (Arabic, Urdu, Malay, etc.)
- Advanced zakat types (business, agriculture, livestock)
- Zakat payment tracking and reminders
- Integration with Islamic calendar
- Offline PWA functionality
- Print-friendly calculation reports
- Mobile applications (iOS/Android)
- Integration with Islamic banking systems
- Educational content and tutorials
- Community features and discussions
- Regional customizations and variations
For the latest updates and announcements, please watch our GitHub repository and follow our development progress.