Good day!
I have a question. I have an auto loan calculator that gets a monthly payment perfectly below
var M; //monthly mortgage payment
var P = amount; //principle / initial amount borrowed
var I = Number(rate) / 100 / 12; //monthly interest rate
var N2 = term;
M2 = monthlyPayment(P, N2, I);
function monthlyPayment(p, n, i) {
return p * i * (Math.pow(1 + i, n)) / (Math.pow(1 + i, n) - 1);
}
I am running into an issue getting the correct biweekly and monthly payment. I assumed that if term was 26 payments (for one year biweekly as an example) and I replaced the 12 in variable I to 18 ... it would work, but to no avail. Can anyone give me an idea what I am doing wrong?