grams to dollars:
1) grams:
2) Dollars/troy ounce:
3) Carat of gold:
Dollars

The formula for this is:
Dollars = grams * GoldPrice / 31.10 * Carat / 24

31.10 is the number of grams in a troy ounce

 
Price per Length to Dollars:
1) Price per Length:
2) Old Gold Price:
3) New Gold Price:
Dollars

The formula for this is:
NewPrice = OldPrice * NewGoldPrice / OldGoldPrice