zakat calculator

def calculate_zakat(savings, investments, gold, silver, other_assets):
total_wealth = savings + investments + gold + silver + other_assets
zakat_due = 0

# Zakat is applicable if the total wealth exceeds the Nisab threshold
nisab_threshold = 3500 # Nisab threshold in currency units (e.g., dollars)
if total_wealth >= nisab_threshold:
zakat_due = total_wealth * 0.025 # 2.5% of total wealth

return zakat_due

# Example usage
savings = 5000
investments = 10000
gold = 2000
silver = 1000
other_assets = 3000

zakat_due = calculate_zakat(savings, investments, gold, silver, other_assets)
print(“Zakat due: ${:.2f}”.format(zakat_due))

We will be happy to hear your thoughts

Leave a reply