npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

uae-gold-calculator

v1.0.1

Published

Gold value calculator for the UAE: 24/22/21/18/14K prices per gram, tola and ounce, making charges, 5% VAT and zakat. Arabic + English. Library + CLI, zero dependencies.

Readme

uae-gold-calculator

Gold value calculator for the UAE market. Give it today's 24K price per gram and it works out every karat, any weight unit, the making charge, 5% VAT and zakat, in Arabic or English. No network calls, no dependencies.

  • Karat table: 24K, 22K, 21K, 18K and 14K per gram, per tola and per troy ounce using the fineness UAE price boards quote: 24K 999, 22K 914, 21K 874, 18K 749, 14K 583 (karat price = 24K price × fineness ÷ 999).
  • Units: gram, kilogram, troy ounce (31.1034768 g), tola (11.6638038 g) and mithqal (4.25 g). Arabic unit names such as جرام, أونصة, تولة, مثقال work too.
  • Jewellery price: metal value + making charge (AED per gram, percent of metal, or a fixed amount) + VAT on both, the way UAE shops bill it.
  • Zakat: adds up pure gold across items, compares it with the 85 g nisab and returns 2.5% of the value when due.
  • Friendly input: 461.11, 461,11, 14,342.21 and Arabic-Indic ٤٦١٫١١ all parse.
  • Arabic and English CLI output (--lang ar).

Install

npm install uae-gold-calculator
# or run the CLI without installing
npx uae-gold-calculator table --price 461.11

Library

const gold = require('uae-gold-calculator');

gold.priceTable(461.11)[2];
// { karat: 21, hallmark: 874, perGram: 403.41, perTola: 4705.34, perOunce: 12547.56 }

gold.itemPrice({ price24: 461.11, weight: 10, karat: 21, making: 30 }).total; // 4550.84
gold.itemPrice({ price24: 400, weight: 5, karat: 18, making: 10, makingType: 'percent', vatRate: 0 }).total; // 1649.45
gold.convert(1, 'أونصة', 'g');                   // 31.1034768
gold.zakat(461.11, [{ weight: 100, karat: 21 }]); // { pureGrams: 87.4875, due: true, zakat: 1008.53, ... }
gold.parseNumber('٤٦١٫١١');                      // 461.11

CLI

$ uae-gold-calculator table --price 461.11
Karat	Per gram	Per tola	Per ounce
24K (999)	461.11	5378.30	14342.12
22K (914)	421.88	4920.68	13121.82
21K (874)	403.41	4705.34	12547.56
18K (749)	345.72	4032.38	10753.00
14K (583)	269.10	3138.69	8369.83

$ uae-gold-calculator item --price 461.11 --weight 10 --karat 21 --making 30 --lang ar
قيمة الذهب: 4034.14 د.إ
المصنعية: 300.00 د.إ
ضريبة القيمة المضافة (5%): 216.71 د.إ
الإجمالي: 4550.84 د.إ

$ uae-gold-calculator convert 2 tola g
23.3276

$ uae-gold-calculator zakat --price 461.11 --weight 100 --karat 21
Zakat due: 1008.53 AED

Options for item: --unit g|kg|oz|tola|mithqal, --karat, --making, --making-type per_gram|percent|fixed, --vat 0.05 (use --vat 0 for investment bars, which are zero-rated in the UAE).

How it calculates

| Step | Formula | |---|---| | Karat price per gram | price24 × fineness / 999 (24K 999, 22K 914, 21K 874, 18K 749, 16K 666, 14K 583; other karats karat / 24) | | Metal value | grams × karat price | | Making charge | rate × grams, or metal × rate / 100, or a fixed amount | | VAT | (metal + making) × 5% | | Zakat | 24K-equivalent grams = Σ grams × purity; due when ≥ 85 g; 2.5% × pure grams × price24 |

Amounts are rounded half away from zero to 2 decimals on output only. Results are estimates: shop prices, VAT treatment of investment gold and zakat rulings vary, so check with your jeweller or scholar.

بالعربية

حاسبة لقيمة الذهب في الإمارات: أدخل سعر جرام الذهب عيار 24 اليوم لتحصل على أسعار عيارات 24 و22 و21 و18 و14 بالجرام والتولة والأونصة، وسعر قطعة المجوهرات مع المصنعية وضريبة القيمة المضافة 5%، وحساب زكاة الذهب حسب نصاب 85 جرامًا. تقبل الأرقام العربية مثل ٤٦١٫١١ وأسماء الوحدات بالعربية، وتعمل دون اتصال بالإنترنت.

Links

License

MIT © UAE Gold Prices