All posts
Product

Why our zakat calculator returns three numbers, not one

The fiqh choices behind a calculator used by 80,000+ donors a year — and the trade-offs we made.

Yusuf Ali· Product9 min read

Last Ramadan, our embeddable zakat calculator was loaded just over 84,000 times across the masjids using it. It is by some margin the most-used single screen we ship — and it is also, by some margin, the screen we've agonized over the most.

The reason is simple: zakat is fiqh, and fiqh is not one answer. Two scholars looking at the same balance sheet can produce two correct numbers. A calculator that pretends otherwise is doing the user a disservice.

masjiddesk.com / tools / zakat
Your assets

Enter only what you've owned for a full lunar year.

Cash & bank balances$12,400
Gold (3 oz @ $2,300)$6,900
Silver$240
Business inventory$0
Stocks (zakat-eligible portion)$8,100
Less: short-term debts−$2,000
Your zakat
Hanafi method
$641.00
Nisab: silver standard
Shafi'i / Maliki / Hanbali
$641.00
Nisab: gold standard
Conservative recommendation
$641.00
Pay the higher of the two when in doubt.
Zakat calculator — three numbers, not one

The three numbers

The calculator always returns three numbers, not one:

  1. The Hanafi calculation, which uses the silver nisab and includes business merchandise differently than the other madhahib.
  2. The Shafi'i / Maliki / Hanbali calculation, which uses the gold nisab.
  3. A "conservative recommendation" — the higher of the two — for users who aren't sure which madhab to follow or who simply want to err on the side of generosity.

Most users pay the conservative number. We watched this happen across thousands of sessions before we shipped it as the default.

Why we don't pick one for you

We tested an earlier version that asked the user to select a madhab and then showed only the corresponding number. It was cleaner. It tested badly.

Users either didn't know which madhab they followed, or they wanted to compare anyway, or they followed one madhab in salah but had been raised paying zakat the other way. Asking them to pick was asking them to make a fiqh decision for which the calculator was the wrong tool.

Showing all three respects the user's intelligence and their relationship with their own scholar. It also reduced support emails to almost zero.

What we deliberately don't calculate

The calculator does not handle:

  • Real estate — too dependent on intent (residence vs. investment).
  • Pension and retirement accounts — too dependent on access and jurisdiction.
  • Agricultural produce, livestock, and minerals — handled separately and with a different calculation.

For each of these we show a small note pointing the user to a scholar. Pretending to calculate them would be worse than declining to.

Where the nisab numbers come from

We pull the spot prices for gold and silver daily from the LBMA reference rate, in the user's display currency. The rates are cached for 24 hours and timestamped on the page. We do not use a single annual figure because the price of gold and silver moves enough during the year that "close enough" is no longer close enough.

The boring engineering bit

The calculator is server-rendered. Every input change submits to a Server Action that runs the math and returns the new totals. We do this — instead of computing in the browser — for two reasons. First, the math evolves with scholarly input and we want every client to see the latest logic without having to re-deploy. Second, it lets us log anonymized aggregate inputs that help us spot bugs (most commonly, currency mismatches).

The lesson, if there is one

Building software for religious practice means deciding, on every screen, where the software stops and the user's relationship with their tradition begins. Three numbers instead of one is a small thing. It is also our way of saying: you decide. We just do the arithmetic.

Why our zakat calculator returns three numbers, not one — MasjidDesk Blog