title: Excel formula in PHP
body: <p>Can anyone tell me the math behind this MS Excel functions. I am writing code in php and I am unable to use
  Excel to calculate these but I still need the same result.</p>
  
  <pre><code>CUMIPMT(rate,nper,pv,start_period,end_period,type) Returns the cumulative
  interest paid on a loan between start_period and end_period.
  </code></pre>
  
  <p>My Excel Function - </p>
  
  <pre><code>=IF($C$33&lt;0,CUMIPMT($C$36/12,$C$35,-$C$33,$C$34,$C$34+11,0),-CUMIPMT($C$36/12,$C$35,$C$33,$C$34,$C$34+11,0))
  </code></pre>
  
  <p>One more question - I used <code>(=E11-E12)</code> but it is not substracting, it adds both values, i cant understand why?</p>
  
  <p>Thank you in advance</p>