PHP Classes


Recommend this page to a friend!
  Classes of uche  >  Compex PHP Compound Interest Calculator  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Compex PHP Compound Interest Calculator
Calculate compound interest on loans
Author: By
Last change:
Date: 4 months ago
Size: 790 bytes


Class file image Download

<p align="center">Compund Interest</p>


  • Get the values of the yearly interest rate, the amount to be interested monthly and the tenor.
  • Calculate the monthly interest rate in percentage. We have the opening and closing values. The opening value starts at 0.
  • Loop, (using a for loop) through the number of months and calculate the interest on both the fixed amount to be invested monthly + opening value. The closing value thus equals the interest on the amount to be invested + interest on the opening value (which is the closing value of the previous day).

As you loop, increment and get the needed values - interest at the said month and total amount invested.

How to Use

  • Git clone and composer install
  • Run php artisan serve
  • Visit /exercise to test code.
For more information send a message to info at phpclasses dot org.