Gold Price Calculator
A gold price calculator determines the value of gold based on weight, purity, and current spot price. Gold is measured in troy ounces (31.1 grams), and purity is expressed in karats or fineness.
Gold Weight Conversions
| Unit | Grams | Troy Ounces |
|---|---|---|
| 1 Gram | 1 | 0.0322 |
| 1 Troy Ounce | 31.1035 | 1 |
| 1 Regular Ounce | 28.3495 | 0.911 |
| 1 Kilogram | 1,000 | 32.15 |
Gold Purity (Karat) Values
| Karat | Purity | Gold Content |
|---|---|---|
| 24K | 99.9% | Pure gold |
| 22K | 91.7% | Jewelry grade |
| 18K | 75.0% | Common jewelry |
| 14K | 58.3% | Popular US standard |
| 10K | 41.7% | Minimum for "gold" |
Gold Value Examples
At $2,000/troy ounce spot price:
| Weight | 24K Value | 18K Value | 14K Value |
|---|---|---|---|
| 1 gram | $64.30 | $48.23 | $37.48 |
| 5 grams | $321.50 | $241.13 | $187.42 |
| 1 troy oz | $2,000 | $1,500 | $1,166 |
| 10 grams | $643.00 | $482.25 | $374.85 |
Gold Price Calculator Implementation
``javascript
function calculateGoldValue(weightGrams, karat, spotPricePerOz) {
const purityMap = {
24: 0.999, 22: 0.917, 18: 0.750, 14: 0.583, 10: 0.417
};
const purity = purityMap[karat] || 0.999;
const gramsPerTroyOz = 31.1035;
const pricePerGram = spotPricePerOz / gramsPerTroyOz;
const pureGoldWeight = weightGrams * purity;
const value = pureGoldWeight * pricePerGram;
return {
weightGrams,
karat,
purity: (purity * 100).toFixed(1) + '%',
pureGoldGrams: pureGoldWeight.toFixed(3),
spotPrice: spotPricePerOz,
value: value.toFixed(2)
};
}
console.log(calculateGoldValue(10, 18, 2000));
// { weightGrams: 10, karat: 18, purity: '75%', pureGoldGrams: '7.5', value: '482.25' }
``
Gold as Investment
Gold serves as inflation hedge and portfolio diversifier. Physical gold (bars, coins) has storage costs. Gold ETFs (GLD) offer easier trading. Spot price is wholesale; retail includes premiums.