Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Gold Karat ValueNew to Visual Studio Code? Get it now.
Gold Karat Value

Gold Karat Value

ilovejackylee

| (0) | Free
Estimate gold melt and scrap value from karat, weight, and a 24K price per gram.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gold Karat Value

Estimate gold melt value from karat, weight, and a 24K price per gram.

Jewelry and scrap workflows usually start from the same three inputs: how heavy the piece is, what karat stamp it carries, and what fine gold is trading at today. This extension keeps that math in the command palette so you can reuse the same rounding rules without leaving the editor.

It does not call a price API. You pass in the 24K price you already have (spot feed, cached quote, or a number typed by you).

Commands

  • Gold Karat Value: Calculate Melt
  • Gold Karat Value: Calculate Scrap

Each command asks for weight, unit, karat, and a 24K price per gram. Scrap also asks for a payout ratio such as 0.85.

Units are gram, pennyweight, troy ounce, troy pound, and kilogram. Karat must be between 0 and 24 (including fractional stamps such as 21.6).

Formula

  1. Convert the entered weight to grams.
  2. Purity ratio = karat ÷ 24 (14K ≈ 0.5833).
  3. Price per gram at that karat = 24K price per gram × ratio, rounded to cents.
  4. Melt value = grams × that per-gram price, rounded to cents.
  5. Scrap estimate = melt value × a payout ratio between 0 and 1 (for example 0.50 at a pawn shop, 0.85 for some online buyers).

The same cent-rounding is applied to per-gram, per-troy-ounce, and per-troy-pound quotes so the message matches a table UI.

When you need live prices

This extension stops at the arithmetic. If you want the same karat and unit conversion with a regularly updated spot price in the browser, there is a scrap gold calculator that applies these ratios without an account.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft