2

I'm trying to use Mathematica to compute compounded interest. I used Wolfram Alpha, and it gave me the code

FormulaData[{"PresentValueFutureValue", "Standard"},
    {"PV" -> Quantity[100000, "USDollars"], "i" -> Quantity[7, "Percent"], "n" -> 35}]

But when I type this in, I get a weird dollar fraction.

How do I turn this into a number that makes sense? I tried indexing into just the number part and doing the // N thing, like:

FormulaData[{"PresentValueFutureValue", "Standard"},
    {"PV" -> Quantity[100000, "USDollars"], "i" -> Quantity[7, "Percent"], "n" -> 35}][[1]][[2]] // N

but that just gives me a dollar sign.

What should I do to just get a normal dollar or decimal value?

Pro Q
  • 231
  • 1
  • 3
  • 2
    http://reference.wolfram.com/language/ref/TimeValue.html – Bill May 19 '18 at 05:25
  • 1
    change Quantity[100000, "USDollars"] to QuantityMagnitude@Quantity[100000., "USDollars"] or to QuantityVariable[100000., "USDollars"]? – kglr May 19 '18 at 08:46
  • Notice that you could just apply N to the result to have a simple decimal value: FormulaData[....] // N returns QuantityVariable["FV","Money"] == Quantity[1.1506151840662945`*^6, "USDollars"]. – MarcoB May 22 '18 at 16:34

0 Answers0