1.0.1 • Published 9 years ago

loan-calculations v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

loan-calculations

NPM version Build Status Coveralls Status Dependency Status Downloads

Module for providing loan and interest calculations.

Install

npm i loan-calculations

API

Functions

getSumPaid(term, monthly, date, installmentDay)

Calculates total amount paid

Kind: global function

ParamTypeDescription
termnumberNumber of installments
monthlynumberMonthly payment
dateDateAcceptance date
installmentDaynumberDay in month of installment payment

getInstallment(amount, interestRate, term, roundingFn) ⇒ Promise

Single installment value

Kind: global function

ParamTypeDescription
amountnumberLoan amount
interestRatenumberLoan interest rate
termnumberNumber on installments (monthly payments)
roundingFnfunctionRounding function

getRpsn(amount, term, monthly, date, installmentDay)

Calculates loan yearly percentage rate

Kind: global function

ParamTypeDescription
amountnumberLoan amount
termnumberNumber of installments
monthlynumberMonthly payment
dateDateAcceptance date
installmentDaynumberDay in month of installment payment

Example

getRpsn(120000, 60, 2700, new Date('2016-07-05'), 5)

Author

  • Viktor Bezdek (@viktorbezdek)
  • Petr Certik (@czert)

License

MIT © SiteOne