payment-plan
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Payment plan

Introduction

Use this lib to calculate payment plan, monthly cost and effective interest.

Install

npm install payment-plan

or

yarn add payment-plan

Functions

Function Description
getEffectiveInterest Calculate the effective interest rate for a loan
getPaymentPlan Generate a payment plan for a loan
getMonthlyCost Calculate the monthly cost for a specific term of a loan

Inputs

getEffectiveInterest

Input Type Description Default Value
loanAmount number Loan amount -
terms number Total number of terms -
interestRate number Annual nominal interest rate (as a decimal) -
startFee number One-time start fee -
termFee number Fee per term -
type LoanTypes (optional) Loan type (ANNUITY or SERIAL) ANNUITY
plan PaymentPlan (optional) Existing payment plan to use instead of generating one -

getPaymentPlan

Input Type Description Default Value
loanAmount number Loan amount -
interestRate number Annual nominal interest rate (as a decimal) -
terms number Total number of terms -
gracePeriod number (optional) Number of grace period terms 0
type LoanTypes (optional) Loan type (ANNUITY or SERIAL) ANNUITY
startFee number (optional) One-time start fee 0
termFee number (optional) Fee per term 0

getMonthlyCost

Input Type Description Default Value
loanAmount number Loan amount -
terms number Total number of terms -
interestRate number Annual nominal interest rate (as a decimal) -
period number (optional) Number of terms per year 12
index number (optional) Term index to calculate the monthly cost for 0
gracePeriod number (optional) Number of grace period terms 0
termFee number (optional) Fee per term 0
type LoanTypes (optional) Loan type (ANNUITY or SERIAL) ANNUITY

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i payment-plan

Weekly Downloads

109

Version

1.1.2

License

MIT

Unpacked Size

23.9 kB

Total Files

20

Last publish

Collaborators

  • slem