2
I need to calculate the present value equivalent to Excel formula, I have the following data:
VP(2,5%;48;-2052,50) which in excel returns me the value of 57,000.00 rounding down.
Can anyone help do this in javascript?
I tried to use this function I found, but it didn’t work.
function PV(rate, nper, pmt)
{
return pmt / rate * (1 - Math.pow(1 + rate, -nper));
}
This is your correct function. Try
PV(0.025, 48, -2052.5)
.– bfavaretto
Actually this form worked for me, my mistake was to put 2.5 in the rate instead of 0.025. Thank you!!!
– David Santos