loan-calculations
Module for providing loan and interest calculations.
Install
npm i loan-calculations
API
Functions
- getSumPaid(term, monthly, date, installmentDay)
Calculates total amount paid
- getInstallment(amount, interestRate, term, roundingFn) ⇒
Promise
Single installment value
- getRpsn(amount, term, monthly, date, installmentDay)
Calculates loan yearly percentage rate
getSumPaid(term, monthly, date, installmentDay)
Calculates total amount paid
Kind: global function
Param | Type | Description |
---|---|---|
term | number |
Number of installments |
monthly | number |
Monthly payment |
date | Date |
Acceptance date |
installmentDay | number |
Day in month of installment payment |
Promise
getInstallment(amount, interestRate, term, roundingFn) ⇒ Single installment value
Kind: global function
Param | Type | Description |
---|---|---|
amount | number |
Loan amount |
interestRate | number |
Loan interest rate |
term | number |
Number on installments (monthly payments) |
roundingFn | function |
Rounding function |
getRpsn(amount, term, monthly, date, installmentDay)
Calculates loan yearly percentage rate
Kind: global function
Param | Type | Description |
---|---|---|
amount | number |
Loan amount |
term | number |
Number of installments |
monthly | number |
Monthly payment |
date | Date |
Acceptance date |
installmentDay | number |
Day in month of installment payment |
Example
Author
- Viktor Bezdek (@viktorbezdek)
- Petr Certik (@czert)
License
MIT © SiteOne