Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
Biweekly and weekly calculation help using javascript

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?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Math isn't my strongest subject, but you are essentially canceling the value of Math.pow() when you divide it by the exact same value in your second math.pow(). Then you are attempting to subtract it by 1. You are forgetting a bracket.

= (Math.pow(1+i,n)) / (Math.pow(1+i,n)) -1;

about 4 years ago · Juan Pablo Isaza Report

0

I have since learned that U.S. and Canada (where I am from) calculate biweekly payments differently. It was throwing me off since my numbers didn't match some popular online calculators. Many calculators simply make the term for bi weekly 24 payments and the interest variable 24. In Canada the term variable has to be 26 and the interest variable also 26.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!