title: calculating rate of return from PV, FV, and monthly contribution
body: <p>I'm trying to figure out what rate of return I would need on an investment in order to compare to paying down a mortgage. </p>
  
  <p>I have calculated the change in the mortgage - I know how much money I'd save by the end of the loan term and how much money I'd need to put in. I'm trying to compare that to an equivalent investment - treat any lump sum payment as the principal of an investment, treat any monthly overpayment as a monthly contribution to an investment, plug in the final value, and solve for the effective rate of return.</p>
  
  <p>I've looked at the <code>RATE</code> and the <code>IRR</code> commands. <code>IRR</code> seems close to what I want, but it wants a series of values for the input flows, but I have it as a periodic regular investment. </p>
  
  <p>For an example with numbers - if I pay an extra $100 a month on the mortgage for 120 months, I can save $10000 in total cost. What command can I use to calculate this in terms of an investment? If I invest $100 a month for ten years and end up with $10000, what was my annualized rate of return?</p>
  
  <p>If I start with principal <code>PV</code> invested at rate R,  I contribute monthly payment <em>M</em> for <em>N</em> months, and I end up with final value <code>FV</code> at the end of those N months, I'd like to solve for <em>R</em> given the other variables. </p>
  
  <p>I know there's another factor regarding the mortgage interesting being tax deductible - I'll look at worrying about that after I figure this part out. </p>
  
  <p>:)</p>