title: Recreate Excel RATE function using Newton's Method
body: <p>I'm working on converting a mortgage calculator in PHP, but I don't necessarily need a PHP solution. I'm looking for the logic needed to replicate the Excel <code>RATE</code> function. I've found a solution which uses bisection, and if worse comes to worse, I use that.</p>
  
  <p>I know someone out there in the interwebs world has knowledge of such a function, so I'd love to have an easy answer instead of creating a solution from scratch.</p>
  
  <p>References:</p>
  
  <ul>
  <li><a href="http://office.microsoft.com/en-us/excel-help/rate-HP005209232.aspx" rel="noreferrer">http://office.microsoft.com/en-us/excel-help/rate-HP005209232.aspx</a></li>
  <li><a href="http://en.wikipedia.org/wiki/Newton%27s_method" rel="noreferrer">http://en.wikipedia.org/wiki/Newton%27s_method</a></li>
  </ul>
  
  <p>Thanks</p>