title: How to calculate floating interest on loan for banking system
body: <p>I am creating a bank loan repayment system, which needs to calculate interest. How can it calculate floating interest rate on a loan account and also flat interest rate on a loan account?</p>
  
  <p>The flat interest rate is <em>10.25% Interest</em>. Here is a table of floating interest rates: </p>
  
  <blockquote>
    <p>01/04/2016 - 30/04/2016: 10.25% Interest<br>
    01/05/2016 - 31/05/2016: 10.00% Interest<br>
    01/06/2016 - 30/06/2016: 09.50% Interest<br>
    01/07/2016 - 31/08/2016: 09.60% Interest</p>
  </blockquote>
  
  <p>The loan amount is <em>196685.2</em><br>
  The loan take date is <em>02/04/2016</em><br>
  The loan repayment date is the <em>10th of every month (recurring for 20 months)</em>.</p>
  
  <p>Give me a formula for how to calculate the interest amount and the principal amount.  </p>
  
  <p>Interest added from :</p>
  
  <pre><code>02/04/2016 to 10/04/2016,
  10/04/2016 to 09/05/2016,
  
  EMI No:.   |  Payment Date  | Beginning Balance  | Principal   | Interest   | Ending Balance
  1          |  10/05/2016    | 196685.2           |             |            |               
  2          |  10/06/2016    |                    |             |            |               
  3          |  10/07/2016    |                    |             |            |               
  4          |  10/08/2016    |                    |             |            |               
  </code></pre>
  
  <p>I need a formula for the interest, principal and EMI calculation using ASP.NET with C# as the programming language.</p>