A Simple Nonprofit Zakat al-Mal Calculator For Ramadan

Three gold lanterns hang against a dark background, with spray-paint-like light-bursts beaming around them. Three 8-pointed stars sparkle nearby.
March 20, 2023
12 minutes
This article is part of a series
Keep learning with related articles.
No items found.

Here at Funraise, we try to build flexible tools for a range of diverse organizations' fundraising needs. Because many Muslims make a charitable contribution at the end of Ramadan, I wanted to do an article that explains the zakat al-mal calculation and what a simple Zakat calculator that integrates with a Funraise donation button looks like.

One of the Five Pillars of Islam is the religious duty for all Muslims who have the means to help the needy. One way by which Muslims do this is by a mandatory charitable contribution called zakat. This contribution is calculated based on the value of one’s wealth and possessions and is typically around 2.5% of a Muslim’s total savings which exceeds a minimum value, the nisab, which is set to the value of 3 oz. of gold or 21 oz. of silver.

It’s worth noting here that zakat al-mal is different than zakat al-fitr, a different charitable contribution that's meant to make sure the poor may celebrate Eid. It happens that many Muslims choose to contribute zakat al-mal around the same time.

The Zakat Calculation

From a contemporary perspective, the first step in calculating zakat al-mal is to sum up all of the assets in the following categories that you have held for more than one lunar year:

  1. Cash on hand
  2. Bank account balance
  3. Cash value of stocks or equities
  4. Profits and inventory
  5. Gold and silver
  6. Investment property
  7. Other income

Cash value of stocks or equities include investments or the value of your 401k or pension funds.

Profits and inventory really only applies if you are a business owner and are making profits from your business or have inventory on hand that could be translated into wealth.

Investment property only applies to properties that are not your home residence and that you own for investment or renting purposes.

Other income typically doesn’t mean your regular job salary as you have to hold the amount for a year for it to be eligible. So, if you save your salary in a savings account for a year, it’s zakat eligible. If you spend it, it’s not eligible for zakat. There are guidelines around the latter case, but we’re going to keep it simple for now.

We’ll call the sum of all of these line items your Gross Assets.

Now, the next step is to figure out your liabilities and deduct this from your Gross Assets. Or:

Zakat Eligible Amount = Gross Assets — Liabilities

There are two major categories of liabilities: Debt and Living expenses. A difference between zakat and something like income taxes is that you don’t evaluate the totality of your outstanding debt for something like a mortgage or the balance of a car loan. You only calculate your liabilities on these types of items for the month that you are contributing zakat for immediate future needs. For example, if you’re contributing zakat in a particular month, you would calculate your Gross Assets by summing up all of your extra wealth and then deducting the mortgage you might have to pay that month, or your immediate living expenses.

A concrete example might be helpful here! Suppose you have $1000 cash on hand, $1000 in a savings account, and $10,000 in your 401k account at work. Now, suppose your liabilities are as follows: You have a mortgage payment of $1500/month and your living expenses are around $1000/month. Your Zakat Eligible Amount would be:

$1,000 + $1,000 + $10,000 — $1,500 — $1,000 = $9,500

Now we need to compare this amount ($9,500)—that's eligible for zakat—to the nisab. If the eligible amount is greater than the nisab, then we need to figure out how much zakat to pay on that eligible amount (2.5%). If our eligible amount is less than the nisab, then we do not need to contribute zakat. So we need to do something like:

if( zakat_eligible_amount > nisab ) {
   zakat_contribution = zakat_eligible_amount*0.025;
} else {
   zakat_contribution = 0;
}

Alright! well, now all we need to do is figure out what value to use for nisab, and we’re almost done! There are two standards one can use for nisab.

  1. The Gold Standard
  2. The Silver Standard

Under the gold standard, the nisab is equal to the cash value 3 oz. of gold at the current market price. On March 21st, 2023, that was $5965.

Under the silver standard, the nisab is equal to the cash value of 21 oz. of silver at the current market price. On March 21st, 2023, that was $474.60.

In today’s market dynamics, since the price of silver is lower relative to gold, your wealth evaluation under the silver standard will be more likely to obligate you to pay zakat. For our demo calculator, we’ll hard code the value of $5965 for now. Perhaps in the future, one could wire in the live price of gold or silver with a precious metals API.

Ok, neat! So the guts of what we want to build looks something like this:

var amt_nisab = 5965;
var amt_home = getValue("amount_home");
var amt_bank = getValue("amount_bank");
var amt_shares = getValue("amount_shares");
var amt_merchandise = getValue("amount_merchandise");
var amt_gold = getValue("amount_gold");
var amt_property = getValue("amount_property");
var amt_other = getValue("amount_other");
var amt_debts = getValue("amount_debts");
var amt_expenses = getValue("amount_expenses");

var amt_assets_gross = amt_home + amt_bank + amt_shares + amt_merchandise + amt_gold + amt_property + amt_other;
var amt_assets_net = amt_assets_gross - amt_debts - amt_expenses;
var amt_eligable = 0;
               
if (amt_assets_net > amt_nisab ); {
   amt_eligable = Math.ceil(amt_assets_net);
}

var amt_zakat = Math.ceil(amt_eligable * .025);

An Easy Donation Experience

Now that we’ve told the user how much zakat they should contribute, wouldn’t it be nice if we could seamlessly set that value for them in a donation experience?

Turns out, there is a pretty nice feature of Funraise Giving Forms called data attributes that we can use to accomplish this. So, once we’re done calculating our zakat value, if we can figure out how to set that data attribute in javascript, we can easily launch the user into a donation flow with their zakat amount already set!

A Funraise Giving Form button looks like the following:

<button type="button" data-formId="271" data-amount="5">Click Me</button>

We can simply give it an ID, and then we can target it and set data attributes like so:

<button id="donate_button" type="button" data-formId="271" data-amount="5">Click Me</button>

And then, simply:

document.getElementById("donate_button").dataset.amount = amt_zakat;

I’ve put a complete example of a sketch of how one might accomplish this in on CodePen. Hope you enjoyed a little background on zakat this Ramadan, as well as one of the ways you can leverage Funraise Giving Forms to meet different giving requirements!


Resource note:

We've gotten much of the information here from online sources like Zakat.org and Islamic Relief USA. If you have further questions about zakat or Islam, we encourage you to visit those websites and other resources.

Mobile phone with donation form and donation charts floating around the phone.Mobile phone with donation form and donation charts floating around the phone.Woman looking at fundraising chart with button to book a call.Yellow shapes in background with donation form in front with stylized text, build an intelligence giving experience.Sparkling star.
Download
Sparkling star.
Start For Free
Sparkling star.Sparkling stars.
Blue shapes.Blue shapes.Blue shapes.
In this Article