Credit Loan Repayment Formula

:pray: Hoping to the heavens that someone here is kind enough and up for the challenge of helping me with a JS Maths formula to be used on the E&P form builder bundled with Pro. I’m a maths idiot so any help would be much appreciated! :heart:

I have a form at
but can’t figure out how exactly to calculate loan repayments. Basically I need a JS formula to replicate the following:

Assume you borrow $100,000 at 6% for 30 years to be repaid monthly. To calculate the monthly payment, convert percentages to decimal format, then follow the formula:

  • a: 100,000, the amount of the loan
  • r: 0.005 (6% annual rate—expressed as 0.06—divided by 12 monthly payments per year)
  • n: 360 (12 monthly payments per year times 30 years)
  • Calculation: 100,000/{[(1+0.005)^360]-1}/[0.005(1+0.005)^360]=599.55, or 100,000/166.7916=599.55

The default Credit Simulator form has this formula ([item-205_quantity]*0.00133)/ (1- Math.pow(1+0.00133,0-[item-206_quantity]*12) )
but for the life of me, after spending hours tinkering with it, I just can’t get it right.

Any help would be much appreciated!