The other day I read that $4,000,000 worth of gold was stolen from a truck. I was wondering how much it would it weigh, and what would be the volume. Sounds like a good problem for Wolfram|Alpha or Mathematica. However, the best I could do was get the price and density of gold. From that I was able to derive the weight and volume. What's the easiest way to get Mathematica to do this for me?

  • 2
    $\begingroup$ the volume will be temperature dependent ...admittedly the difference will not be significant in terms of planning the robbery. i.e. the size of the getaway vehicle will not depend on the temperature $\endgroup$ – Mike Honeychurch Mar 5 '15 at 22:43

In Mathematica (version 10):

weight=UnitConvert[Quantity[4 10^6, "USDollars"]/(Entity["Element", "Gold"]["Price"]), "Pounds"]
(* Quantity[228.315, "Pounds"] *)

 weight/(Entity["Element", "Gold"]["Density"]), "Liters"]
(* Quantity[5.36442, "Liters"] *)
  • $\begingroup$ Intriguing pound-liter unit system there. :) $\endgroup$ – kirma Mar 5 '15 at 19:34
  • 2
    $\begingroup$ @kirma USA! USA! USA! $\endgroup$ – chuy Mar 5 '15 at 20:50
  • $\begingroup$ BTW this only weighs 210.3 lbs these days! $\endgroup$ – chuy Mar 18 at 16:27

WolframAlpha for a quick overview:

enter image description here


Mathematica (version < 10)

FinancialData["XAU/USD"] returns the price of one Troy Ounce, but the equivalence to kilograms isn't available in Mathematica v9 as far as I see. So:

i = Quiet@Import["https://www.google.com/search?&q=troy+ounce+to+kilograms", "HTML"];
troyToKg = ToExpression@First@StringCases[i, "One troy ounce is" ~~ x__ ~~ " grams" :> x]/ 1000;
dens = ChemicalData["Au", "Density"]/1000;
pricePerOunce = FinancialData["XAU/USD"];
ounces = 4 10^6/pricePerOunce;
kilos = ounces troyToKg;
volumeLiters = kilos/ dens

(* 5.36634 *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.