Price Calculation Methodology

How We Calculate Gold Prices

Every price on this site starts from one input: the SAR-per-gram price of 24K gold from our data provider. From that value, we calculate karats, buy and sell prices, bars, ounce, kilogram, and used-gold values using the fixed formulas below.

  1. Source: We call the metals.dev API to fetch the SAR/gram price of gold directly, alongside the SAR/USD exchange rate (used only for the displayed USD/gram column, not for the base calculation).
  2. Update cadence: A scheduled Cloudflare Worker calls our pipeline hourly during Saudi active hours (~20 runs per day), totaling ~600 requests per month.
  3. Storage: Each fetch is written to a Cloudflare D1 database. All public pages read only from D1 — pages never call the provider directly.
  4. Karat prices: derived from the 24K gram price multiplied by purity ratios:
    • 24K = 100% (24/24)
    • 22K = 91.67% (22/24)
    • 21K = 87.5% (21/24)
    • 18K = 75% (18/24)
    • 14K = 58.33% (14/24)
  5. Buy price (shop sells to you): raw gram price × 1.18 — an 18% uplift covering Saudi VAT (15%) plus an average 3% workmanship and operating margin.
  6. Sell price (shop buys from you): raw gram price × 0.99 — a 1% deduction below spot as a used-gold handling margin, before any testing fees.
  7. Ounce price: gram price × 31.1035 (troy ounce).
  8. Tola price: gram price × 11.6638.
  9. Kilogram price: gram price × 1000.
  10. Bar prices: (24K gram price × weight) + a fixed SAR premium per weight (e.g. 58 SAR for a 1g bar, 480 SAR for a 50g bar, 4500 SAR for a 1kg bar).
  11. Daily change & trend: the difference between today and yesterday's close is computed once on the server. The trend is labeled "up" when the difference exceeds +0.5 SAR/g, "down" when it is below −0.5 SAR/g, and "stable" between those thresholds.

Note: Buy and sell prices shown are calculated Saudi market averages and do not represent a binding quote from any specific shop. Final prices may vary by city, jewelry type, making charge, and individual shop policy.