kfiku / LoanJS

Calculate loan in js (browser/node.js) for equal installments, installments decreasing, the sum of interest, etc.
http://kfiku.github.io/LoanJS/
MIT License
29 stars 15 forks source link

Calculate "annuity due" #68

Open vettloffah opened 1 year ago

vettloffah commented 1 year ago

I need to get an amortization where the payment is made in the beginning of the pay period, not the end. This is known as an "annuity due".

If anyone knows how to modify the calculation to achieve that please let me know.

kfiku commented 1 year ago

Hello, For now its not possible. I will try to add this option to calculation and let you know. Thanks, Grzegorz

kfiku commented 1 year ago

Hi @vettloffah, please update to version 1.1.0 and than use

const annuityDueLoan = new Loan(1000, 12, 5, 'annuityDue');

please let me know if it's working for you

vettloffah commented 1 year ago

Hi @vettloffah, please update to version 1.1.0 and than use


const annuityDueLoan = new Loan(1000, 12, 5, 'annuityDue');

please let me know if it's working for you

Very cool thanks buddy I will try it out

vettloffah commented 1 year ago

@kfiku I'm being told my our corporate accountant that the monthly installment amount is correct for the annuityDue option. However when calculating annuity due, the first payment should have $0.00 interest since the payment is made at the beginning of the billing period. Currently the software package is returning interest including in the first installment.

kfiku commented 1 year ago

Hello, Ok i will check it next week, Thanks for letting me know

kfiku commented 1 year ago

@vettloffah can you show me an example of similar calculator online, because I can not find any similar examples. Its also interesting that "monthly installment amount is correct", now if I will make first installment with 0 interest rate, than all other installments will be changed.

Can you provide some proper example with all installments?