zakat-mal
v1.2.1
Published
Authoritative, mathematically rigorous, and Fiqh-verified Zakat Mal calculation engine. Grounded in Al-Qur'an, Sahih Hadith, AAOIFI Shari'ah Standard No. 35, and Fatwa MUI/BAZNAS.
Maintainers
Readme
🕌⚖️ zakat-mal
The Authoritative, Mathematically Rigorous & Fiqh-Verified Zakat Mal Engine
Built for Global Islamic Fintechs, Neobanks, WealthTech Platforms, Amil Zakat Institutions (BAZNAS, PPZ, ZATCA, MUIS), and 1.9+ Billion Muslims Worldwide.
Features • Why zakat-mal • Architecture • Installation • Quick Start • Modules • Fiqh References • CLI • FAQ • Sponsor
📌 Executive Summary
zakat-mal is an enterprise-grade, zero-dependency TypeScript library engineered to compute all categories of Zakat al-Mal (Islamic Wealth Tax) with mathematical precision and textual Shari'ah fidelity.
Unlike amateur online web forms that rely on lossy IEEE-754 floating-point math and arbitrary percentages, zakat-mal incorporates:
- Zero-Hallucination Fiqh Grounding: Rooted in Al-Qur'an, Sahih Bukhari & Muslim, AAOIFI Shari'ah Standard No. 35 on Zakah, and international Fiqh academies (OIC Fiqh Academy Jeddah, Majelis Ulama Indonesia, BAZNAS, ZATCA Saudi Arabia).
- Arbitrary-Precision Fixed-Point Math: Zero IEEE-754 binary floating-point roundoff errors (
0.1 + 0.2 !== 0.3). - Dual Lunar & Solar Calendar Precision: Computes standard 2.500% on Hijri lunar fiscal years and mathematically adjusts to 2.577% for Gregorian 365-day fiscal accounting periods in accordance with AAOIFI Standard 35 Section 4/1/4.
- Universal i18n & Multi-Currency Engine: Defaults to international English (
en) andUSD, with native support for Indonesian (id), Arabic (ar), and any ISO 4217 currency (EUR,GBP,SAR,AED,MYR,SGD,IDR). - Developer & Tooling Ready: Provides native TypeScript declarations, comprehensive documentation, and configuration files for modern development workflows.
⚡ The Problem: Why Existing Zakat Calculators Fail
Most zakat calculators deployed across the web suffer from critical engineering and jurisprudential flaws:
| Flaw Category | Common Online Calculators / Snippets | zakat-mal Enterprise Engine |
| :--- | :--- | :--- |
| Arithmetic Precision | Uses native JavaScript Number (IEEE-754), creating dangerous penny & cent rounding discrepancies. | Built-in arbitrary-precision Decimal engine with zero external dependencies. |
| Calendar Fiscal Year | Applies flat 2.5% to Gregorian 365-day years, underpaying zakat by 11 days of wealth accumulation. | Implements AAOIFI Standard 35 §4/1/4 solar year adjustment: 2.5% × (365 / 354) = 2.577%. |
| Purity Adjustment | Ignores Karat breakdown for gold jewelry (treats 18K as 24K). | Mathematically factors 24K, 22K, 18K, 14K purity ratios and applies customary personal use exemptions ('Urf). |
| Modern Asset Classes | Restricted to cash and physical gold; lacks rules for Sukuk, ETFs, Crypto, and Real Estate yield. | Covers 10 distinct asset classes including Corporate Balance Sheets (AAOIFI 35), Crypto, Stocks, and Al-Mustaghallat. |
| Debt & Hawl Handling | Deducts entire multi-year loans (e.g. 15-year mortgage) wiping out all zakat obligation. | Strictly isolates immediate operational debts due within the current fiscal period per contemporary consensus. |
| Shari'ah Auditability | Black-box output with no proof. | Every calculation returns authenticated Qur'an & Hadith dalil citations in Arabic, English, and Indonesian. |
🌟 Key Highlights
- 📦 10 Asset Categories Supported:
- 🪙 Gold & Silver (An-Naqdayn): Karat purities (24K–14K), investment bullion vs. personal jewelry ('urf).
- 💵 Cash & Bank Savings: Checking, savings, fixed deposits, foreign currencies, short-term debt deduction.
- 🏬 Business Merchandise ('Urud at-Tijarah): Working capital approach, inventory fair market valuation, receivables.
- 💼 Professional Income: Gross vs. Net (Hajah Ashliyyah essential living allowance), monthly vs. annual nisab.
- 🌾 Agriculture & Harvest (Zuru' wa Thimar): 5 Wasaq nisab, 10% natural vs. 5% artificial vs. 7.5% mixed irrigation.
- 🐪 Livestock (Al-An'am): Exact Sahih Hadith brackets for Camels, Cattle/Buffalo, and Sheep/Goats with combinatorial optimization.
- 📈 Stocks & Capital Markets: Active trading stocks vs. long-term dividend yield (10% Qiyas 'Ala az-Zuru').
- 🪙 Cryptocurrency & Digital Assets: Bitcoin, Ethereum, and stablecoins evaluated as trade merchandise at market value.
- 🏢 Corporate Zakat (AAOIFI Standard 35): Net Working Capital and Net Equity methods with Muslim shareholder equity ratios.
- 🏛️ Rental Property (Al-Mustaghallat): Capital asset exemption, 10% on net received yield or 2.5% annual surplus.
- 🏺 Rikaz & Mining: Flat 20% Al-Khumus on ancient buried treasure; 2.5% on mineral extraction.
- 🌍 Trilingual i18n Localization: English (
en), Indonesian (id), and Arabic (ar). - 💱 Multi-Currency Architecture: Support for
USD,EUR,GBP,SAR,AED,MYR,SGD,IDR. - 🧪 100% Test Coverage & Automated E2E Validator: 58 vitest suites plus real-world isolated sandbox consumer testing (
npm run test:e2e). - 🚀 Ultra-Fast & Zero Dependencies: Bundled via
tsupinto dual ESM (.mjs) and CommonJS (.js) with full TypeScript declarations (.d.ts). Runs in Node.js >= 18, Bun, Deno, Cloudflare Workers, and modern browsers.
🏗️ Engine Architecture
flowchart TD
A["User Asset Input\n(Portfolio / Single Category)"] --> B["Input Validation & Sanitization\n(Zero / Negative Checks)"]
B --> C["Jurisdiction & i18n Resolution\n(Global AAOIFI / BAZNAS / ZATCA / MUIS)"]
C --> D{"Asset Category Router"}
D --> D1["Gold & Silver\n(Karat Purity Ratio)"]
D --> D2["Cash & Savings\n(Liquid - Due Debts)"]
D --> D3["Business Trade\n(Working Capital)"]
D --> D4["Professional Income\n(Net / Hajah Ashliyyah)"]
D --> D5["Agriculture\n(5 Wasaq / Irrigation)"]
D --> D6["Livestock\n(Hadith Bracket Solver)"]
D --> D7["Capital Markets & Crypto\n(Trading vs Dividends)"]
D --> D8["Corporate AAOIFI 35\n(Working Capital / Equity)"]
D1 & D2 & D3 & D4 & D5 & D6 & D7 & D8 --> E["Arbitrary-Precision Decimal Core\n(No IEEE-754 Roundoff Discrepancies)"]
E --> F["Hawl & Nisab Threshold Verification\n(Lunar 2.500% vs Solar 2.577%)"]
F --> G["Dalil Reference Engine\n(Quran, Hadith, Contemporary Fatwa)"]
G --> H["Localized ZakatResult Object\n(isObligatory, zakatDue, notes, references)"]📥 Installation
# Using npm
npm install zakat-mal
# Using pnpm
pnpm add zakat-mal
# Using yarn
yarn add zakat-mal
# Using bun
bun add zakat-mal🚀 Quick Start
1. Unified Multi-Asset Portfolio Calculation
Calculate zakat across multiple disparate wealth categories in a single call:
import { calculatePortfolioZakat } from 'zakat-mal';
const portfolio = calculatePortfolioZakat({
// Global configuration
locale: 'en',
currency: 'USD',
// 1. Gold holdings
goldSilver: {
goldGrams: 100, // 100g pure gold (Nisab is 85g)
goldPricePerGram: 75, // $75 / gram
calendar: 'hijri'
},
// 2. Bank savings & liquid cash
cashSavings: {
bankSavings: 25000,
immediateDueDebts: 2000,
goldPricePerGram: 75,
calendar: 'hijri'
},
// 3. Digital crypto assets
crypto: {
portfolioValue: 15000,
goldPricePerGram: 75
}
});
console.log('Total Zakat Due:', portfolio.totalZakatDueMonetary, portfolio.currency);
// => "Total Zakat Due: 937.50 USD"
console.log('Categories Obligatory:', portfolio.obligatoryCount);
// => 3
console.log('Summary Notes:', portfolio.summaryNotes);
// => ["Successfully calculated 3 asset categories: 3 categories reached Nisab..."]🌍 Global Internationalization & Multi-Currency
zakat-mal operates out-of-the-box with global defaults and zero configuration.
A. Global Default: International English & USD
import { calculateGoldSilverZakat } from 'zakat-mal';
const res = calculateGoldSilverZakat({
goldGrams: 120,
goldPricePerGram: 75
});
console.log(res.zakatableAmount); // "Gold: 120.00g | Silver: 0.00g"
console.log(res.currency); // "USD"
console.log(res.locale); // "en"B. Saudi Arabia / GCC Profile: Arabic & SAR
import { calculateCashSavingsZakat } from 'zakat-mal';
const res = calculateCashSavingsZakat({
bankSavings: 100000,
goldPricePerGram: 280, // SAR
currency: 'SAR',
locale: 'ar'
});
console.log(res.zakatDue); // "2500.00"
console.log(res.notes); // Text in ArabicC. Indonesia Profile: Indonesian & IDR (BAZNAS Decree)
import { calculateIncomeZakat } from 'zakat-mal';
const res = calculateIncomeZakat({
grossIncome: 15000000,
basicLivingExpenses: 5000000,
dueDebtInstallment: 1000000,
useBaznasNisab: true, // SK Ketua BAZNAS No. 15/2026
currency: 'IDR',
locale: 'id'
});
console.log(res.zakatDue); // "225000.00" IDR📚 Comprehensive Asset Classes
1. 🪙 Gold & Silver (An-Naqdayn)
Calculates zakat on physical gold bullion, coins, and silver according to classical purity Karats (24K, 22K, 18K, 14K) and customary personal jewelry exemptions ('Urf):
import { calculateGoldSilverZakat } from 'zakat-mal';
const result = calculateGoldSilverZakat({
goldGrams: 120,
goldPurityKarat: 18, // 18K = 75% purity -> 90g pure gold (>= 85g nisab)
goldUsage: 'investment',
goldPricePerGram: 75, // $75 / gram
calendar: 'hijri' // 2.5%
});
console.log('Pure Gold:', result.details.pureGoldWeightGrams); // "90.0000"
console.log('Zakat Due in Gold:', result.details.goldZakatDueGrams); // "2.2500" g
console.log('Monetary Due:', result.details.goldZakatDueMonetary); // "168.75" USD2. 💵 Cash, Savings & Bank Deposits
Covers liquid balances across checking accounts, fixed deposits, foreign currencies, and digital wallets, with deductions for immediate short-term liabilities:
import { calculateCashSavingsZakat } from 'zakat-mal';
const result = calculateCashSavingsZakat({
cashInHand: 5000,
bankSavings: 30000,
timeDeposits: 20000,
immediateDueDebts: 5000, // Deducted from zakatable base
goldPricePerGram: 75,
calendar: 'hijri'
});
console.log('Net Base:', result.zakatableAmount); // "50000.00"
console.log('Zakat Due:', result.zakatDue); // "1250.00"3. 🏬 Business Merchandise ('Urud at-Tijarah)
Follows the classical and AAOIFI working capital rule: (Liquid Cash + Market Value Inventory + Good Receivables) - Operational Debts Due:
import { calculateBusinessZakat } from 'zakat-mal';
const result = calculateBusinessZakat({
cashAndLiquidAssets: 15000,
inventoryMarketValue: 60000,
goodReceivables: 10000,
dueOperationalDebts: 12000,
goldPricePerGram: 75
});
console.log('Working Capital Base:', result.zakatableAmount); // "73000.00"
console.log('Zakat Due:', result.zakatDue); // "1825.00"4. 💼 Professional Income & Earnings
Implements both Gross and Net (Hajah Ashliyyah) salary deductions as endorsed by contemporary Fiqh boards:
import { calculateIncomeZakat } from 'zakat-mal';
const result = calculateIncomeZakat({
grossIncome: 8000,
basicLivingExpenses: 2500, // Food, rent, utilities
dueDebtInstallment: 500, // Monthly installment due
method: 'net',
period: 'monthly',
goldPricePerGram: 75
});
console.log('Is Obligatory:', result.isObligatory);
console.log('Net Zakatable Base:', result.zakatableAmount); // "5000.00"
console.log('Zakat Due:', result.zakatDue); // "125.00"5. 🌾 Agriculture & Crops (Zuru' wa Thimar)
Strictly adheres to the 5 Wasaq benchmark (653 kg unhusked grain / 520 kg milled rice). Zakat is due on harvest day with zero Hawl requirement:
import { calculateAgricultureZakat } from 'zakat-mal';
const result = calculateAgricultureZakat({
harvestWeightKg: 2000,
irrigation: 'artificial', // 5% (Nisf al-'Usyr)
produceType: 'grain_unhusked',
operationalCostsDeduction: 200 // Operational costs deducted per Hanbali school
});
console.log('Zakat Due (Weight):', result.zakatDue); // "90.00 kg"6. 🐪 Livestock (Al-An'am)
Implements the authentic Hadith tables for Camels, Cattle/Buffalo, and Sheep/Goats, complete with an integer optimization solver for large herds:
import { calculateLivestockZakat } from 'zakat-mal';
// Cattle: 75 head
const result = calculateLivestockZakat({
animalType: 'cattle',
count: 75,
isPastured: true,
isWorkingAnimal: false
});
console.log('Items Due:', result.zakatDue);
// => "1x تَبِيع / تَبِيعَة (Male / Female Yearling Cattle (Tabi')), 1x مُسِنَّة (Two-year-old Cow (Musinnah))"7. 🏢 Corporate Zakat (AAOIFI Standard No. 35)
Engineered for corporate balance sheets using either the Net Working Capital Approach or the Net Equity Approach, factoring in Muslim equity ownership:
import { calculateCorporateZakat } from 'zakat-mal';
const result = calculateCorporateZakat({
method: 'net_working_capital',
currentAssets: 5000000,
nonZakatableCurrentAssets: 500000, // Non-trade prepayments
currentLiabilities: 1500000,
muslimOwnershipPercentage: 80, // 80% Muslim equity
goldPricePerGram: 75,
calendar: 'gregorian' // Automatically applies 2.577% solar rate
});
console.log('Muslim Zakatable Base:', result.zakatableAmount); // "2400000.00"
console.log('Rate Applied:', result.rateApplied); // "2.577% (AAOIFI Standard 35 Solar Adjustment)"
console.log('Corporate Zakat Due:', result.zakatDue); // "61848.00"8. 📈 Capital Markets, Sukuk & Cryptocurrency
Distinguishes between active day-trading stocks ('Urud at-Tijarah) and long-term dividend holdings (10% Qiyas):
import { calculateInvestmentsZakat, calculateCryptoZakat } from 'zakat-mal';
// Stocks & Dividend Yield
const stockRes = calculateInvestmentsZakat({
tradingStocksValue: 50000,
longTermDividendIncome: 6000, // 10% zakat applied exclusively to received dividend
goldPricePerGram: 75
});
// Crypto Assets
const cryptoRes = calculateCryptoZakat({
portfolioValue: 45000,
goldPricePerGram: 75,
currency: 'USD'
});🚀 Enterprise Fintech Modules (v1.1.0)
zakat-mal includes 7 enterprise-grade modules designed specifically for banking portals, neobanks, amil institutions, and full-stack web applications.
1. 🌐 Price & FX Oracle Engine (zakat-mal/oracle)
Pluggable oracle layer with in-memory fallback, live API support, and TTL caching:
import { StaticPriceOracle, StaticFxOracle, CachedOracle, isValidCurrency } from 'zakat-mal/oracle';
const priceOracle = new StaticPriceOracle();
const goldPrice = await priceOracle.fetchPrice('gold', 'IDR');
console.log(goldPrice.pricePerUnit); // "1600000.00"
const fxOracle = new StaticFxOracle();
const rate = await fxOracle.fetchFxRate('USD', 'IDR');
console.log(rate.rate); // "16200"2. 🧺 Multi-Currency Asset Basket (zakat-mal/basket)
Consolidates heterogeneous currencies into a base currency using the classical Fiqh principle of Dhamm al-Amwal:
import { calculateMultiCurrencyBasketZakat } from 'zakat-mal/basket';
const basket = await calculateMultiCurrencyBasketZakat({
targetCurrency: 'IDR',
assets: [
{ name: 'US Cash', category: 'cash_savings', amount: 5000, currency: 'USD' },
{ name: 'Local Savings', category: 'cash_savings', amount: 50000000, currency: 'IDR' },
{ name: 'Saudi Account', category: 'cash_savings', amount: 10000, currency: 'SAR' }
]
});
console.log(basket.totalZakatableBaseTargetCurrency); // "170000000.00" IDR
console.log(basket.totalZakatDueTargetCurrency); // "4250000" IDR3. ⏳ Hawl Lifecycle & Continuity Tracker (zakat-mal/hawl)
Analyzes continuous multi-month bank balances against Nisab thresholds according to Jumhur (Shafi'i, Maliki, Hanbali) vs Hanafi jurisprudence:
import { trackHawlContinuity } from 'zakat-mal/hawl';
const hawl = trackHawlContinuity({
goldPricePerGram: 1600000, // 85g = Rp 136M nisab
currency: 'IDR',
madhhab: 'jumhur', // Dips below nisab restart hawl
ledger: [
{ date: '2025-01-01', balance: 150000000 },
{ date: '2025-06-01', balance: 160000000 },
{ date: '2025-12-25', balance: 175000000 }
]
});
console.log(hawl.status); // "matured"
console.log(hawl.isZakatDueNow); // true
console.log(hawl.percentCompleted); // "100.0%"4. 🌍 Active Jurisdictions & Madhhab Engine (zakat-mal/jurisdiction)
Provides certified regional rules for Malaysia (PPZ Had Kifayah & KWSP), Singapore (MUIS CPF), Saudi Arabia (ZATCA Corporate), and Classical Madhhabs:
import {
calculateMalaysiaIncomeZakat,
calculateSingaporeCpfZakat,
calculateSaudiZatcaCorporateZakat,
evaluateJewelryByMadhhab
} from 'zakat-mal/jurisdiction';
// Malaysia Had Kifayah (PPZ MAIWP)
const myResult = calculateMalaysiaIncomeZakat({
grossAnnualIncome: 120000,
hasNonWorkingWife: true,
numSchoolChildren: 2,
annualEpfContribution: 13200
});
// Singapore CPF Retirement (MUIS)
const sgResult = calculateSingaporeCpfZakat({
cpfWithdrawnAmount: 50000,
isAccountActiveOrLocked: false // Withdrawn at age 55
});
// Hanafi vs Jumhur Jewelry Ruling
const jewelry = evaluateJewelryByMadhhab({
weightGrams: 100,
goldPricePerGram: 85,
isCustomaryPersonalAdornment: true,
madhhab: 'hanafi' // Always zakatable in Hanafi; exempt in Shafi'i
});5. 🤲 Lafadz Niat, Ijab & Qabul (Akad Zakat) Generator (zakat-mal/akad)
Generates authenticated intention and receipt statements with Arabic, Latin transliteration, and translations for web checkout:
import { generateZakatAkad } from 'zakat-mal/akad';
const akad = generateZakatAkad({
category: 'income',
muzakkiName: 'Ahmad Khairan',
amount: '3750000',
currency: 'IDR',
locale: 'id'
});
console.log(akad.niat.arabic); // "نَوَيْتُ أَنْ أُخْرِجَ زَكَاةَ مَالِي فَرْضًا لِلَّهِ تَعَالَى"
console.log(akad.doaPenerima.arabic); // "آجَرَكَ اللَّهُ فِيمَا أَعْطَيْتَ..."6. 📜 Zakat Audit Certificate & Tax Deduction Slip (zakat-mal/reports)
Generates Bukti Setor Zakat (BSZ) compliant with Indonesian Law (UU 23/2011 Pasal 22), 8 Asnaf schedule (QS. At-Tawbah 9:60), and cryptographic verification checksum:
import { generateZakatCertificate } from 'zakat-mal/reports';
import { calculateGoldSilverZakat } from 'zakat-mal/gold-silver';
const calc = calculateGoldSilverZakat({ goldGrams: 100, goldPricePerGram: 1600000 });
const cert = generateZakatCertificate({
result: calc,
muzakkiName: 'Khairan Noor',
taxDetails: { taxIdNumber: '09.123.456.7-890.000', authorizedAmilName: 'BAZNAS' }
});
console.log(cert.certificateId); // "ZK-A8F4129B-C3E90124"
const htmlReport = cert.toHtml(); // Formatted printable invoice with CSS print styling7. 📋 Front-End Form Validation Schemas (zakat-mal/schemas)
Zero-dependency validation helpers and field descriptors for React Hook Form, Formik, or Vue:
import { validateGoldSilverForm, validateIncomeForm, GOLD_FORM_DESCRIPTORS } from 'zakat-mal/schemas';
const validation = validateGoldSilverForm({
goldGrams: '100',
goldPurityKarat: '22',
goldPricePerGram: '1600000'
});
if (validation.isValid) {
console.log(validation.data); // Sanitized typed payload ready for calculation
}📜 Authenticated Shariah Dalil Catalog
Every calculation performed by zakat-mal links to authentic source texts. The complete database can be programmatically queried:
import { getAllDalils, getDalilsForCategory, searchDalil } from 'zakat-mal';
// Get dalils for gold & silver
const goldDalils = getDalilsForCategory('gold_silver');
console.log(goldDalils[0]);
/*
{
id: 'hadith_abu_dawud_1573',
category: 'hadith',
title: 'Nisab Emas 20 Dinar dan Syarat Haul 1 Tahun',
source: 'Sunan Abu Dawud No. 1573',
arabicText: 'فَإِذَا كَانَتْ لَكَ مِائَتَا دِرْهَمٍ ...',
translationEn: 'When you possess two hundred dirhams and one year passes...',
translationId: 'Bila engkau memiliki 200 dirham dan telah berlalu satu tahun...',
grade: 'Sahih (Al-Albani)',
relevance: 'Menetapkan nisab emas adalah 20 dinar (85 gram) dan perak 200 dirham (595 gram)...'
}
*/💻 Command-Line Interface (CLI)
zakat-mal comes bundled with an interactive, zero-install terminal binary via npx:
# Calculate gold zakat
npx zakat-mal gold --grams 100 --price 75 --currency USD
# Calculate crypto zakat
npx zakat-mal crypto --value 50000 --gold-price 75
# Calculate corporate zakat (AAOIFI Standard 35)
npx zakat-mal corporate --assets 1000000 --liabilities 300000 --gold-price 75
# Calculate livestock zakat for cattle
npx zakat-mal livestock --type cattle --count 75
# Browse Shariah dalils
npx zakat-mal dalil --topic corporate
npx zakat-mal dalil --search Bukhari🧪 Mathematical Benchmarks & Precision
zakat-mal eliminates binary floating-point inaccuracies through its custom Decimal engine:
import { Decimal, D } from 'zakat-mal';
// Standard JS IEEE-754:
// 0.1 + 0.2 = 0.30000000000000004
// zakat-mal Arbitrary Precision:
const preciseSum = D('0.1').add('0.2');
console.log(preciseSum.toFixed(1)); // "0.3"All calculation modules undergo rigorous unit testing:
- 81 Passed Unit Tests (100%) across 21 test suites.
- Automated sandbox testing packing real
.tgztarballs and executing ESM, CJS, and TypeScript compilers inside isolated test directories.
💻 Framework Integration Guide (React & Next.js)
How to Calculate Zakat in React or Next.js (App Router)?
Install zakat-mal via npm install zakat-mal. Use modular imports to ensure zero bundle overhead:
import { calculateGoldSilverZakat } from 'zakat-mal/gold-silver';
import { calculateIncomeZakat } from 'zakat-mal/income';
import { calculateCashSavingsZakat } from 'zakat-mal/cash-savings';
import { calculateCorporateZakat } from 'zakat-mal/corporate';
import { validateGoldSilverForm, GOLD_FORM_DESCRIPTORS } from 'zakat-mal/schemas';
import { generateZakatCertificate } from 'zakat-mal/reports';❓ Frequently Asked Questions (FAQ)
What makes zakat-mal different from standard online calculators?
Most web calculators use simple JavaScript formulas with floating-point numbers, ignore Karat purity, overlook debt isolation rules, and use the lunar 2.5% rate even for solar 365-day fiscal accounting periods. zakat-mal fixes all of these through exact Fiqh standards (AAOIFI Standard 35), arbitrary precision math, and embedded textual evidence.
Does zakat-mal support multi-currency?
Yes. zakat-mal supports any ISO 4217 currency (USD, EUR, GBP, SAR, AED, MYR, SGD, IDR, etc.). By default, global functions use USD, but users can specify any currency or localized preset.
Is zakat-mal only for Indonesia?
No. While it includes official presets for Indonesia (such as SK Ketua BAZNAS No. 15 Tahun 2026), its default foundation is Universal Shari'ah Jurisprudence recognized across the Muslim world (AAOIFI Standard 35, OIC International Fiqh Academy Jeddah, and classical 4-Madhhab consensus).
Can zakat-mal run on edge runtimes and frontend frameworks?
Yes. The library has zero external dependencies and zero native bindings. It compiles to ESM and CJS and is tested on Node.js >= 18, React, Next.js, React Native, Cloudflare Workers, Deno, and Bun.
💖 Support & Sponsorship
zakat-mal is an independent, 100% free open-source initiative dedicated to bringing zero-dependency, mathematically verified Shari'ah financial engineering to developers and Muslim organizations worldwide.
If this project helps you, your startup, or your institution, you can support its development (traktir kopi / makan):
👉 Support via Tako.id: https://tako.id/codesbykhai
📄 License
MIT © Khairan Noor
Grounded in Al-Qur'an, Sahih Hadith, and AAOIFI Shari'ah Standards for the Global Ummah.
