title: How to calculate Future Value (FV) using JavaScript
body: <p>I've been given a task to convert a simple spreadsheet to a HTML form to be used on a website, that is going to do some calculations using JavaScript. This would be no problem at all except I know <em>nothing</em> about financial functions, and I've ran into FV (Future Value).</p>
  <p>This is the spreadsheet:</p>
  <pre><code>B3 = 100
  B4 = 10
  B5 = B4*12
  B6 = 12
  B7 = 3
  B8 = (1+B6)^(1/12)-1
  B9 = ABS(FV(B8,B5,B3/(1+B7),,1)) // and here lies the problem
  </code></pre>
  <p>This is what OO.org's help has to say about FV:</p>
  <blockquote>
  <p>Returns the future value of an investment based on periodic, constant payments and a constant interest rate (Future Value).</p>
  <p>Syntax: FV(Rate; Num_periods; Payment; PV (optional); Type)</p>
  </blockquote>
  <p><strong>The question is: How does one calculate FV using the parameters above?</strong></p>
  <p>Sample values:</p>
  <pre><code>B3 = 100          1        1        2
  B4 = 10           1        2        2
  B9 = 21,751.06    12.39    26.28    52.55
  </code></pre>