How to calculate APR
Hi
does anyone know the formula for calculating the gross annual percentage rate (APR) of a mortgage?
I use this function to calculate the mortgage payment amount:
var R = Number (this.getField ("RATE"). valueAsString) / 100;
var N = Number (this.getField ("NUMBER OF YEARS"). valueAsString) * 12;
var P = Number (this.getField ("AMOUNT"). valueAsString);
event.value = P * (R / 12) * (Math.pow ((1 + (R / 12)), N)) / ((Math.pow ((1 + (R / 12)), N)) - 1)
Then I have the fields "Investigation", "appraisal", "fire insurance for the house"
From the data entered in the fields listed above, I would like to be able to find the "gross annual percentage rate" (APR).
Please, someone knows the function
