kaurikk/loan-amount-calculator

This package is abandoned and no longer maintained. No replacement package was suggested.

[Loan amount calculator library]

Installs: 592

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/kaurikk/loan-amount-calculator

0.0.3 2017-04-29 10:57 UTC

This package is not auto-updated.

Last update: 2023-04-25 17:09:41 UTC


README

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

loan-amount-calculator

Library for calculating loan interest, payment amounts. Contains 2 main parts:

  • Interest calculator
  • Payment amount calculator (supports annuity and equal principal payments)

Basic usage

Interest calculator

// Rate for 30 days
$yearlyInterestRate = 360;
$ratePerPeriod = $yearlyInterestRate / 360 * 30;
// Present value from where interest is calculated
$presentValue = 5000;


$calculator = new InterestAmountCalculator();
$interestAmount = $calculator->getInterestAmount($presentValue, $ratePerPeriod);

echo $interestAmount; // 1500